Public Member Functions | Static Public Attributes | Private Attributes
tornado.log.LogFormatter Class Reference

List of all members.

Public Member Functions

def __init__
def format

Static Public Attributes

dictionary DEFAULT_COLORS
string DEFAULT_DATE_FORMAT = '%y%m%d %H:%M:%S'
string DEFAULT_FORMAT = '%(color)s[%(levelname)1.1s %(asctime)s %(module)s:%(lineno)d]%(end_color)s %(message)s'

Private Attributes

 _colors
 _fmt
 _normal

Detailed Description

Log formatter used in Tornado.

Key features of this formatter are:

* Color support when logging to a terminal that supports it.
* Timestamps on every log line.
* Robust against str/bytes encoding problems.

This formatter is enabled automatically by
`tornado.options.parse_command_line` (unless ``--logging=none`` is
used).

Definition at line 70 of file log.py.


Constructor & Destructor Documentation

def tornado.log.LogFormatter.__init__ (   self,
  color = True,
  fmt = DEFAULT_FORMAT,
  datefmt = DEFAULT_DATE_FORMAT,
  colors = DEFAULT_COLORS 
)

Definition at line 92 of file log.py.


Member Function Documentation

def tornado.log.LogFormatter.format (   self,
  record 
)

Definition at line 132 of file log.py.


Member Data Documentation

Definition at line 106 of file log.py.

Definition at line 106 of file log.py.

Definition at line 106 of file log.py.

Initial value:
{
        logging.DEBUG: 4,  # Blue
        logging.INFO: 2,  # Green
        logging.WARNING: 3,  # Yellow
        logging.ERROR: 1,  # Red
    }

Definition at line 85 of file log.py.

string tornado::log.LogFormatter::DEFAULT_DATE_FORMAT = '%y%m%d %H:%M:%S' [static]

Definition at line 84 of file log.py.

string tornado::log.LogFormatter::DEFAULT_FORMAT = '%(color)s[%(levelname)1.1s %(asctime)s %(module)s:%(lineno)d]%(end_color)s %(message)s' [static]

Definition at line 83 of file log.py.


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


rosbridge_server
Author(s): Jonathan Mace
autogenerated on Thu Aug 27 2015 14:50:40