casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
Public Member Functions | Public Attributes | Private Attributes
asap.logging.AsapLogger Class Reference

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

Definition at line 25 of file logging.py.


Member Function Documentation

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.

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.


Member Data Documentation

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().


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