Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Formatter instances are used to convert a LogRecord to text.

Formatters need to know how a LogRecord is constructed. They are
responsible for converting a LogRecord to (usually) a string which can
be interpreted by either a human or an external system. The base Formatter
allows a formatting string to be specified. If none is supplied, the
default value of "%s(message)\n" is used.

The Formatter can be initialized with a format string which makes use of
knowledge of the LogRecord attributes - e.g. the default value mentioned(more...)

src/r/e/redsmaster-1.0.2/src/redsmaster/log.py   redsmaster(Download)
 
formatter = logging.Formatter(
    "[%(asctime)s] %(threadName)s - %(levelname)s :: %(message)s")
 
def get_logger(name):
    """Returns the logger from Cement with proper console format."""
    console_formatter = logging.Formatter("%(message)s")