Skip to content

Commit

Permalink
logger ini file
Browse files Browse the repository at this point in the history
  • Loading branch information
vrym2 committed May 12, 2023
1 parent a41676f commit 4b4550f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions logger.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[loggers]
keys=root

[handlers]
keys=consoleHandler,fileHandler

[formatters]
keys=sampleFormatter

[logger_root]
level=DEBUG
handlers=consoleHandler,fileHandler

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=sampleFormatter
args=(sys.stdout,)

[handler_fileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=sampleFormatter
args=('app.log', 'a', 10485760, 5)

[formatter_sampleFormatter]
class=colorlog.ColoredFormatter
format=%(log_color)s%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=%Y-%m-%d %H:%M:%S

log_colors={
'DEBUG': 'green',
'INFO': 'cyan',
'WARNING': 'yellow',
'ERROR': 'red',
'CRITICAL': 'bold_red'}

0 comments on commit 4b4550f

Please sign in to comment.