Skip to content

fse-658 reworking logger to capture console.log, .error, and .info. Defaulted to no colors

Caleb Weeks requested to merge feature/fse-658 into master

Change Summary
Make the log level and use of colors in the log configurable.
Normalize log format and capture uses of console.log, .error, and .info

Log format
LEVEL : TIMESTAMP : LOGGER_NAME : FILE_LINE_NUMBER : MESSAGE

Format Description LEVEL: TRACE | DEBUG | INFO | WARNING | ERROR | CRITICAL
TIMESTAMP: yyyyMMdd-hh:mm:ms (ex: 20180922-09:37:10)
LOGGER_NAME: the logger name used by the app. If any of the console functions are used the name will be 'default'
FILE_LINE_NUMBER: the name of the file and the line number where the log statement was placed
MESSAGE: the actual message to log

Default configuration will be to use colors in the logger and to output all log levels: https://gitlab.entropy.cc/fs-blacklight/site/merge_requests/71

Configuration for the stage environments will remove colors and limit the log levels: https://gitlab.entropy.cc/fs-blacklight/fs-blacklight/merge_requests/137/diffs

Edited by Caleb Weeks

Merge request reports