Tools.logit.LogIt

LogIt makes logging easier by creating easy loggers.

Usage

Source

Tools.logit.LogIt()

Methods

Name Description
__init__() Initialize the logger format based on system platform.
custom() Create a log handler or logger.
default() Create a log handler using default formatting.
deletelog() Delete the log file.
shutdown() Shutdown the log handlers.

__init__()

Initialize the logger format based on system platform.

Usage

Source

__init__()

custom()

Create a log handler or logger.

Usage

Source

custom(logname, logfile, level, fmt="default")
Parameters
logname

Name of the log.

logfile

Path to the logfile. Can be None

level

Logging level.

fmt="default"
Logging format (fmt is default).
Returns
A custom_log object is returned.

default()

Create a log handler using default formatting.

Usage

Source

default(logname, logfile)
Parameters
logname

Name of the log.

logfile
Path to the logfile. Can be None.
Returns
A default_log object is returned.

deletelog()

Delete the log file.

Usage

Source

deletelog(logfile)
Parameters
logfile
Name of the logfile to be deleted.

shutdown()

Shutdown the log handlers.

Usage

Source

shutdown()

Windows won’t just delete a log (linux distros will). It must be shutdown.