Common: Add colorized log formatter

New log formatter that color the output depending on the log
level of the message. The default palette handles: INFO,
SUCCESS, ERROR, DEBUG and CRITICAL.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-12-05 02:07:34 -04:00
parent 8e69178e07
commit 59fbbd82e2
2 changed files with 23 additions and 0 deletions
+1
View File
@@ -193,6 +193,7 @@ class CommonApp(MayanAppConfig):
'disable_existing_loggers': False,
'formatters': {
'intermediate': {
'()': 'mayan.apps.common.log.ColorFormatter',
'format': '%(name)s <%(process)d> [%(levelname)s] "%(funcName)s() line %(lineno)d %(message)s"',
},
'logfile': {