Skip to main content

No project description provided

Project description


A simple logging utility for Python.


Description of Constructors's Argument

name Description
shift_freq frequency of log file rotation. [sec]
shift_size file size of log file rotation. [byte]
level Logging severity threshold. Default values is logger.DEBUG
init Whether to clear log files. [True / False]
datetime_format Date and time format. Default value is '%Y-%m-%d %H:%M:%S.%f'.
shift_period_suffix The log file suffix format for rotation. Default is '_%Y-%m-%d'.

Simple Example

from activelog import Logger

# Create a Logger that prints to STDOUT
log = Logger(Logger.STDOUT)
log.debug("Created Logger")"Program finished")

# Create a Logger that prints to Log File
log = Logger('log file path')
log.warn("This is WARN message")
log.error("This is ERROR message")

Log File Shift Example

# Switch log file daily
log = Logger('log file path', shift_freq=60*60*24)
# Switch log file weekly
log = Logger('log file path', shift_freq=60*60*24*7)

# Switch log file every 10MB
log = Logger('log file path', shift_size=100000000)

Output Example

[2020-01-01 07:11:09.887267 line:4] INFO  -- : Program Start!!
[2020-01-01 07:11:23.535936 line:9] ERROR -- : Program End...


$ pip install activelog


Bug reports and pull requests are welcome on GitHub at

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for activelog, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size activelog-1.0.1-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page