Agent SDK
|
Logger Custom Class for capturing some portion (or all) logging in the Python code. More...
Public Member Functions | |
def | register (self, loggerName) |
Register this logger instance with the logging library and make it available to JSON configured setups. More... | |
def | createSimpleLogger (self, severity) |
Sets up logging to call the log() method of this instance with any log message of severity or greater. More... | |
def | log (self, severity, logtext) |
Called whenever this logger gets a new log line. More... | |
Logger Custom Class for capturing some portion (or all) logging in the Python code.
You can either simply create a simple logger, which sends all logs at or above a severity to your derived custom logger instance. Or, you can register this instance with the logger library and then completely config things using a JSON file. With this method, you can create multiple Python instances and separate log output by channel.
To use this class, you must derive your own version in which you implement the log(self, logText, severity) method.
def ionicsdk.log.CustomLogger.createSimpleLogger | ( | self, | |
severity | |||
) |
Sets up logging to call the log() method of this instance with any log message of severity or greater.
severity | (int): Minimum severity for this logger. Log messages with a lower severity are filtered out. |
def ionicsdk.log.CustomLogger.log | ( | self, | |
severity, | |||
logtext | |||
) |
Called whenever this logger gets a new log line.
You must sub class and override this method to use this.
severity | (int): Specifies how detailed the logging will be - SEV_TRACE and SEV_FATAL are the most detailed and the least detailed levels, respectively. |
logtext | (unicode string): Formatted text of the log line to record. |
def ionicsdk.log.CustomLogger.register | ( | self, | |
loggerName | |||
) |
Register this logger instance with the logging library and make it available to JSON configured setups.
loggerName | (unicode string): The reference name of the logger that will be used in the JSON configuration file. |
You acknowledge your access, review and use of the documentation on this page is subject to the Ionic Security Inc. Documentation Use Rights.
© 2016-2018 Ionic Security Inc. All rights reserved.
Generated on Tue Nov 27 2018 16:30:08 for Agent SDK by
1.8.12