Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Global variables

logger

global logger instance that can be imported in other modules.


Examples

>>> # This example demonstrates how to import the global logger in other Python modules. 

>>> # Assume that logger is imported below in test.py that resides in the same folder as extension.py

>>> from universal_extension import logger

>>> logger.info('sample info message from test.py')

>>> logger.warning('sample warning message from test.py')

>>> logger.critical('sample critical message from test.py')


Classes

class ExtensionLogger (name)

Class for providing logging functionality for Universal Extensions. Do not instantiate this class directly. UniversalExtension instantiates this class via a call to the logging.getLogger API call. See the example above for instructions on obtaining the logger instance.

The following log levels are officially supported:

  • CRITICAL
  • ERROR
  • WARNING
  • INFO
  • DEBUG

In addition to the levels listed above, there is another level, TRACE, which is used by the Universal Extension internal API. It is NOT available for use in developing Extensions.


  • No labels