
###############################################################################
################################### LOGGING ###################################
###############################################################################
# Main logger for SASView

# SEE: https://docs.python.org/2/library/logging.html#logrecord-attributes
[formatters]
keys=simple,detailed

[formatter_simple]
#format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
#format=%(asctime)s - %(levelname)s : %(name)s:%(pathname)s:%(lineno)4d: %(message)s
#format=%(asctime)s - %(levelname)s : %(name)s:%(lineno)4d: %(message)s
format=%(asctime)s - %(levelname)s: %(message)s
datefmt=%H:%M:%S

[formatter_detailed]
#format=%(asctime)s : %(levelname)s : %(name)s: %(lineno)d: %(message)s
format=%(asctime)s : %(levelname)s : %(name)s (%(filename)s:%(lineno)s) :: %(message)s

###############################################################################
# Handlers

[handlers]
keys=console,log_file

[handler_console]
class=logging.StreamHandler
formatter=simple
level=WARNING
args=tuple()

[handler_log_file]
class=logging.FileHandler
level=DEBUG
formatter=detailed
args=(os.path.join(os.path.expanduser("~"),'sasview.log'),"a")

###############################################################################
# Loggers

[loggers]
keys=root,saspr,sasgui,sascalc,sasmodels

[logger_root]
level=DEBUG
formatter=default
handlers=console,log_file

[logger_sasmodels]
level=INFO
qualname=sas.models
handlers=console,log_file
propagate=0

[logger_saspr]
level=INFO
qualname=sas.pr
handlers=console,log_file
propagate=0

[logger_sasgui]
level=DEBUG
qualname=sas.sasgui
handlers=console,log_file
propagate=0

[logger_sascalc]
level=INFO
qualname=sas.sascalc
handlers=console,log_file
propagate=0

