kopia lustrzana https://github.com/inkstitch/inkstitch
70 wiersze
2.2 KiB
TOML
70 wiersze
2.2 KiB
TOML
|
### customize this file and save as LOGGING.toml
|
||
|
### logging/warning template for inkstitch
|
||
|
### format: toml
|
||
|
### enable config file in DEBUG.toml: log_config_file
|
||
|
|
||
|
### warnings.simplefilter(action), default: "default"
|
||
|
### - possible values: "error", "ignore", "always", "default", "module", "once"
|
||
|
warnings_action = "default"
|
||
|
|
||
|
### logging.captureWarnings() default: true
|
||
|
### - possible values: true, false
|
||
|
warnings_capture = true
|
||
|
|
||
|
### mandatory, must be an integer and 1
|
||
|
version = 1
|
||
|
|
||
|
### disable loggers activated before the configuration is loaded
|
||
|
disable_existing_loggers = false
|
||
|
|
||
|
### define the loggers, handlers, formatters, filters
|
||
|
[filters]
|
||
|
|
||
|
[formatters.simple]
|
||
|
format = "%(asctime)s [%(levelname)s]: %(filename)s.%(funcName)s: %(message)s"
|
||
|
|
||
|
[formatters.debug]
|
||
|
format = "%(asctime)s %(message)s"
|
||
|
|
||
|
|
||
|
[handlers.file_inkstitch]
|
||
|
class = "logging.FileHandler"
|
||
|
formatter = "simple"
|
||
|
filename = "%(SCRIPTDIR)s/logs/inkstitch.log"
|
||
|
mode = "w"
|
||
|
|
||
|
[handlers.file_inkstitch_debug]
|
||
|
class = "logging.FileHandler"
|
||
|
formatter = "debug"
|
||
|
filename = "%(SCRIPTDIR)s/logs/inkstitch_debug.log"
|
||
|
mode = "w"
|
||
|
|
||
|
[handlers.file_root]
|
||
|
class = "logging.FileHandler"
|
||
|
formatter = "simple"
|
||
|
filename = "%(SCRIPTDIR)s/logs/inkstitch_root.log"
|
||
|
mode = "w"
|
||
|
|
||
|
|
||
|
### used for: logger = logging.getLogger("inkstitch")
|
||
|
### logger = logging.getLogger("inkstitch.xxx") where xxx is not specified in this config file
|
||
|
### - highest level logger for all 'inkstitch.*' loggers
|
||
|
[loggers.inkstitch]
|
||
|
level = "DEBUG"
|
||
|
handlers = [ "file_inkstitch",]
|
||
|
propagate = false
|
||
|
|
||
|
### used for: logger = logging.getLogger("inkstitch.debug")
|
||
|
### - use quotes for the logger name with dots, otherwise it will be treated as a table subsection
|
||
|
### - [loggers.inkstitch.debug] is not the same as [loggers.'inkstitch.debug']
|
||
|
[loggers.'inkstitch.debug']
|
||
|
level = "DEBUG" # to enable the logger, seems to be the default
|
||
|
# level = "CRITICAL" # to disable the logger
|
||
|
handlers = [ "file_inkstitch_debug",]
|
||
|
propagate = false
|
||
|
|
||
|
### root - loggers not specified in this config file will be managed by this logger
|
||
|
[loggers.root]
|
||
|
level = "DEBUG"
|
||
|
handlers = [ "file_root",]
|