Package library :: Package pyjamas :: Package logging
[hide private]
[frames] | no frames]

Package logging

source code

Logging module for Pyjamas, mimicking CPython's logging module.

Usage example:

   from pyjamas import logging
   log = logging.getConsoleLogger()
   log.debug('This is a debug message')

Author: Peter Bittner <peter.bittner@gmx.net>

Submodules [hide private]

Functions [hide private]
 
getLoggerForHandler(handler, name=__name__, level=DEBUG, fmt=BASIC_FORMAT)
Use this function to easily include new loggers in your application, e.g.
source code
 
getAlertLogger(name=__name__, level=DEBUG, fmt=BASIC_FORMAT)
A logger that shows any log message in a browser's alert popup dialog.
source code
 
getAppendLogger(name=__name__, level=DEBUG, fmt=BASIC_FORMAT)
A logger that appends text to the end of the HTML document body.
source code
 
getConsoleLogger(name=__name__, level=DEBUG, fmt=BASIC_FORMAT)
A logger that uses Firebug's console.log() function.
source code
 
getNullLogger(name=__name__, level=DEBUG, fmt=BASIC_FORMAT)
A logger that does nothing.
source code
 
getPrintLogger(name=__name__, level=DEBUG, fmt=BASIC_FORMAT)
A logger that prints text to cerr, the default error output stream.
source code
Variables [hide private]
  PLAIN_FORMAT = '%(message)s'
Function Details [hide private]

getLoggerForHandler(handler, name=__name__, level=DEBUG, fmt=BASIC_FORMAT)

source code 

Use this function to easily include new loggers in your application, e.g. <code>log = logging.getLoggerForHandler(NullHandler())</code>

getNullLogger(name=__name__, level=DEBUG, fmt=BASIC_FORMAT)

source code 

A logger that does nothing. Use it to disable logging.