Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes | List of all members
mycroft.util.log.LOG Class Reference

Public Member Functions

def __init__ (self, name)
 
def create_logger (cls, name)
 
def init (cls)
 

Static Public Attributes

 debug = _make_log_method(logging.Logger.debug)
 
 error = _make_log_method(logging.Logger.error)
 
 exception = _make_log_method(logging.Logger.exception)
 
 handler = None
 
 info = _make_log_method(logging.Logger.info)
 
 level = None
 
 warning = _make_log_method(logging.Logger.warning)
 

Private Member Functions

def _log (cls, func, args, kwargs)
 

Static Private Attributes

 _custom_name = None
 

Detailed Description

Custom logger class that acts like logging.Logger
The logger name is automatically generated by the module of the caller

Usage:
    >>> LOG.debug('My message: %s', debug_str)
    13:12:43.673 - :<module>:1 - DEBUG - My message: hi
    >>> LOG('custom_name').debug('Another message')
    13:13:10.462 - custom_name - DEBUG - Another message

Definition at line 39 of file log.py.

Constructor & Destructor Documentation

def mycroft.util.log.LOG.__init__ (   self,
  name 
)

Definition at line 92 of file log.py.

Member Function Documentation

def mycroft.util.log.LOG._log (   cls,
  func,
  args,
  kwargs 
)
private

Definition at line 96 of file log.py.

def mycroft.util.log.LOG.create_logger (   cls,
  name 
)

Definition at line 86 of file log.py.

def mycroft.util.log.LOG.init (   cls)

Definition at line 64 of file log.py.

Member Data Documentation

mycroft.util.log.LOG._custom_name = None
staticprivate

Definition at line 51 of file log.py.

mycroft.util.log.LOG.debug = _make_log_method(logging.Logger.debug)
static

Definition at line 57 of file log.py.

mycroft.util.log.LOG.error = _make_log_method(logging.Logger.error)
static

Definition at line 60 of file log.py.

mycroft.util.log.LOG.exception = _make_log_method(logging.Logger.exception)
static

Definition at line 61 of file log.py.

mycroft.util.log.LOG.handler = None
static

Definition at line 52 of file log.py.

mycroft.util.log.LOG.info = _make_log_method(logging.Logger.info)
static

Definition at line 58 of file log.py.

mycroft.util.log.LOG.level = None
static

Definition at line 53 of file log.py.

mycroft.util.log.LOG.warning = _make_log_method(logging.Logger.warning)
static

Definition at line 59 of file log.py.


The documentation for this class was generated from the following file:


mycroft_ros
Author(s):
autogenerated on Mon Apr 26 2021 02:35:41