Logger classes used to generate structured logs in Flocker
Handles all logging, pushes logs to Flocker and shouts Flocker links to Panotti, using the scheduler GUID as label.
Parameters: |
|
---|
Sets the lowest log level that should be added to log.
Parameters: | lvl – Sets the lowest level of log messages that should be added to the log. |
---|
Retrieves a stack trace and prints it to log.
Parameters: | lvl – Sets the level of the log entry. |
---|
Logs the message with a time stamp, a level descriptor and a color code.
Parameters: |
|
---|---|
Returns: | The return parameter from Workspace.flocker_push_string(). |
Parses the flocker return value to a URL.
Parameters: | flocker_return – The return value from Workspace.flocker_push_string(). |
---|---|
Returns: | A tuple: The Flocker URL and the Flocker session key. |
Used by Logger to colorize strings and retrieving name and numeric value from a log level.
The different log levels:
'Level' 'Name' 'Numeric value' 'Color'
'd' 'DEBUG' '10' 'White'
'i' 'INFO' '20' 'Blue'
'w' 'WARNING' '30' 'Yellow'
'e' 'ERROR' '40' 'Red'
'x' 'UNKNOWN' '0' 'Purple'
Parameters: |
|
---|---|
Returns: | The colorized string. |
Parameters: | level – The level to get the numeric value for. |
---|---|
Returns: | The numeric value of the log level. |
Parameters: | level – The level to get the name for. |
---|---|
Returns: | The name of the log level. |
Parameters: | level – The level to verify |
---|---|
Returns: | The level if it is an ok level |
Raises : | Exception if the level supplied is not an ok level |