Catalog PyPI
PACKAGE EXPLORERView in registry

activelog

PyPI
logloggerlogging
Versions collected1
Direct dependencies0From release 1.0.1
Last observed20 Oct, 18:36 UTC

README

Version 1.0.1 documentation

ActiveLog

A simple logging utility for Python.

Usage

Description of Constructors's Argument

nameDescription
shift_freqfrequency of log file rotation. [sec]
shift_sizefile size of log file rotation. [byte]
levelLogging severity threshold. Default values is logger.DEBUG
initWhether to clear log files. [True / False]
datetime_formatDate and time format. Default value is '%Y-%m-%d %H:%M:%S.%f'.
shift_period_suffixThe 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")
log.info("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 #sample.py line:4] INFO  -- : Program Start!!
[2020-01-01 07:11:23.535936 #sample.py line:9] ERROR -- : Program End...

Installation

$ pip install activelog

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/AjxLab/ActiveLog.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.16 Jan 20200

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ajxlab/activelog

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:36 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:08a5b9ae1ee0bdf8ee2697e4f9e41569c2c70585583a060b9f24d87e60cb93c2