Elektron Logging library ()

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

View file

@ -25,12 +25,12 @@ myhost:kernel.all.cpu.sys
When we run the `pmdumptext` command mentioned above for 5 seconds, the PCP log from _Elektron_ would be as shown below.
```
<yyyy/mm/dd> <hh:mm:ss> myhost:kernel.all.cpu.user,myhost:kernel.all.cpu.sys
<yyyy/mm/dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
<yyyy/mm/dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
<yyyy/mm/dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
<yyyy/mm/dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
<yyyy/mm/dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> myhost:kernel.all.cpu.user,myhost:kernel.all.cpu.sys
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> <myhost user cpu time>,<myhost system cpu time>
```
## Power Measurements

View file

@ -9,6 +9,6 @@ The scheduled trace logs are written to a file named _\<logFilePrefix\>\_\<times
The format of the data logged is as shown below.
```
<yyyy/mm/dd> <hh:mm:ss> <hostname>:<task ID>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> <hostname>=<task ID>
```

View file

@ -8,7 +8,7 @@ The logs are written to a file named _\<logFilePrefix\>\_\<timestamp\>\_schedPol
The format of the data logged is as shown below.
```
<yyyy/mm/dd> <hh:mm:ss> <sched policy name>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> Name=<sched policy name>
```
_Note: The names of the scheduling policies can be found [here](https://gitlab.com/spdf/elektron/blob/master/schedulers/store.go#L14)_

View file

@ -8,5 +8,5 @@ The logs are written to a file named _\<logFilePrefix\>\_\<timestamp\>\_schedWin
The format of the data logged is as shown below.
```
<yyyy/mm/dd> <hh:mm:ss> <sched window size> <sched policy name>
```
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> Window size=<sched window size>, Name=<sched policy name>
```

View file

@ -8,7 +8,7 @@ The logs are written to a file named _\<logFilePrefix\>\_\<timestamp\>\_classifi
The format of the data logged is as shown below.
```
<yyyy/mm/dd> <hh:mm:ss> <overhead>
[<loglevel>]: <yyyy-mm-dd> <hh:mm:ss> Overhead in microseconds=<overhead>
```
_Note: The classification overhead is logged in **microseconds**._