Package starcluster :: Module logger :: Class ConsoleLogger
[hide private]
[frames] | no frames]

Class ConsoleLogger

source code


Instance Methods [hide private]
 
format(self, record)
Format the specified record.
source code
 
emit(self, record)
Emit a record.
source code

Inherited from logging.StreamHandler: __init__, flush

Inherited from logging.Handler: acquire, close, createLock, handle, handleError, release, setFormatter, setLevel

Inherited from logging.Filterer: addFilter, filter, removeFilter

Class Variables [hide private]
  formatters = {logging.INFO: logging.Formatter(">>> %(message)s...
Method Details [hide private]

format(self, record)

source code 

Format the specified record.

If a formatter is set, use it. Otherwise, use the default formatter for the module.

Overrides: logging.Handler.format
(inherited documentation)

emit(self, record)

source code 

Emit a record.

If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an 'encoding' attribute, it is used to encode the message before output to the stream.

Overrides: logging.Handler.emit
(inherited documentation)

Class Variable Details [hide private]

formatters

Value:
{logging.INFO: logging.Formatter(">>> %(message)s\n"), INFO_NO_NEWLINE\
: logging.Formatter(">>> %(message)s"), logging.DEBUG: logging.Formatt\
er("%(filename)s:%(lineno)d - %(levelname)s - %(message)s\n"), logging\
.WARN: logging.Formatter("%(filename)s:%(lineno)d - %(levelname)s - %(\
message)s\n"), logging.CRITICAL: logging.Formatter("%(filename)s:%(lin\
eno)d - %(levelname)s - %(message)s\n"), logging.ERROR: logging.Format\
ter("%(filename)s:%(lineno)d - %(levelname)s - %(message)s\n")}