Public Member Functions | |
def | __init__ |
def | post |
def | clear |
def | push |
def | enable |
def | disable |
def | is_enabled |
Public Attributes | |
logger | |
Private Attributes | |
_enabled | |
_log |
Wrapper object to allow for both casapy and asap logging. Inside casapy this will connect to `taskinit.casalog`. Otherwise it will create its own casa log sink. .. note:: Do not instantiate a new one - use the :obj:`asaplog` instead.
Definition at line 16 of file logging.py.
def asap.logging.AsapLogger.__init__ | ( | self | ) |
Definition at line 25 of file logging.py.
def asap.logging.AsapLogger.clear | ( | self | ) |
Definition at line 64 of file logging.py.
References asap.logging.AsapLogger.logger.
def asap.logging.AsapLogger.disable | ( | self, | |
flag = False |
|||
) |
Disable (or enable) logging
Definition at line 88 of file logging.py.
References asap.logging.AsapLogger._enabled.
def asap.logging.AsapLogger.enable | ( | self, | |
flag = True |
|||
) |
Enable (or disable) logging.
Definition at line 84 of file logging.py.
References asap.logging.AsapLogger._enabled.
def asap.logging.AsapLogger.is_enabled | ( | self | ) |
Definition at line 92 of file logging.py.
References asap.logging.AsapLogger._enabled.
def asap.logging.AsapLogger.post | ( | self, | |
level = 'INFO' , |
|||
origin = "" |
|||
) |
Post the messages to the logger. This will clear the buffered logs. Parameters: level: The log level (severity). One of INFO, WARN, ERROR.
Definition at line 35 of file logging.py.
References asap.logging.AsapLogger._enabled, asap.logging.AsapLogger._log, and asap.logging.AsapLogger.logger.
def asap.logging.AsapLogger.push | ( | self, | |
msg, | |||
newline = True |
|||
) |
Push logs into the buffer. post needs to be called to send them. Parameters: msg: the log message (string) newline: should we terminate with a newline (default yes)
Definition at line 68 of file logging.py.
References asap.logging.AsapLogger._enabled, and asap.logging.AsapLogger._log.
asap.logging.AsapLogger._enabled [private] |
Definition at line 26 of file logging.py.
Referenced by asap.logging.AsapLogger.disable(), asap.logging.AsapLogger.enable(), asap.logging.AsapLogger.is_enabled(), asap.logging.AsapLogger.post(), and asap.logging.AsapLogger.push().
asap.logging.AsapLogger._log [private] |
Definition at line 27 of file logging.py.
Referenced by asap.logging.AsapLogger.post(), and asap.logging.AsapLogger.push().
Definition at line 30 of file logging.py.
Referenced by asap.logging.AsapLogger.clear(), and asap.logging.AsapLogger.post().