The db_handler Module

class cloudfusion.mylogging.db_handler.DBHandler(db_identifier)

Bases: logging.Handler

This logging handler sends events to cloudfusion.mylogging.db_logging_thread.

Parameters:db_identifier – identifier from cloudfusion.mylogging.db_logging_thread.get_logging_db_identifier()
emit(record)

Emit a record.

Writes the LogRecord to the database.

reconnect()

The nullhandler Module

Created on May 7, 2013

@author: joe

class cloudfusion.mylogging.nullhandler.NullHandler(level=0)

Bases: logging.Handler

Logging handler doing nothing (if python 2.6 is used this handler is not available by default).

Initializes the instance - basically setting the formatter to None and the filter list to empty.

createLock()
emit(*args, **kwargs)
handle(record)
lock = None

The db_logging_thread Module

Created on Jul 29, 2013

@author: joe

cloudfusion.mylogging.db_logging_thread.__get_records(cursor, conn)

Get and delete next record from database. :returns: next record from database or None

cloudfusion.mylogging.db_logging_thread._clean_db(cursor, conn)
cloudfusion.mylogging.db_logging_thread._handleRecord(record)
cloudfusion.mylogging.db_logging_thread._serve_until_stopped()
cloudfusion.mylogging.db_logging_thread.create_dbhandler()

Get a database logging handler to log to the database logging thread. Only call this method after calling start() once.

cloudfusion.mylogging.db_logging_thread.get_logging_db_identifier()
Returns:identifier of the database in use for cloudfusion.mylogging.db_handler.DBHandler
cloudfusion.mylogging.db_logging_thread.make_logger_multiprocessingsave(logger)
cloudfusion.mylogging.db_logging_thread.start()

Start processing records in a background thread.

cloudfusion.mylogging.db_logging_thread.stop()

Table Of Contents

Previous topic

Developers documentation

Next topic

The virtualfile Module

This Page