Elektron Logging library (#16)

switch to logrus for logging.

replaced old logging library with a wrapper around logrus.
We now just need to use the exported Log(...) and Logf(...) from the logging/
package that wraps around a set of loggers constituting a chain (following COR).
Loggers are configured using a YAML file that specifies the following.
1. enabled/disabled
2. whether the message should be logged on console.
3. filename extension.
4. minimum log level.

Retrofitted source code to now use the updated logging library.
Updated the documentation with information regarding the specification
of the log config file.

Currently, the log format in the config file is not adhered to. This is going to be
addressed in a future commit.
This commit is contained in:
Bhargavi Hanumant Alandikar 2019-12-09 20:15:33 -05:00 committed by PRADYUMNA KAUSHIK
parent 9977251c14
commit 3543960689
61 changed files with 1510 additions and 1067 deletions

26
logConfig.yaml Normal file
View file

@ -0,0 +1,26 @@
schedTrace:
enabled: true
filenameExtension: _schedTrace.log
allowOnConsole: true
sps:
enabled: false
filenameExtension: _schedPolicySwitch.log
allowOnConsole: true
console:
enabled: true
filenameExtension: _console.log
minLogLevel: debug
allowOnConsole: true
pcp:
enabled: true
filenameExtension: .pcplog
allowOnConsole: false
schedWindow:
enabled: false
filenameExtension: _schedWindow.log
allowOnConsole: true
clsfnTaskDistrOverhead:
enabled: false
filenameExtension: _classificationOverhead.log
allowOnConsole: true