Skip to main content

Very lightweight yet simple rotating file loggger

Project description

Python Logger:

This script was made for logging as fast and simple as possible. Make sure you have write permission for your log file.

It's reccommended that you use an absolute route for your log file.

Multiple instances of this logger can be used (With same or different log_name)

Sample usage:

from pathlib import Path # This line is intended for using Path(), it is not required for LocalLogger
from pythonlogger.logger import LocalLogger

log = LocalLogger(str(Path(__file__).resolve().parent) + '/log.log', 'Some-logger')
log.debug('mensaje debug')
log.info('mensaje info')
log.warning('mensaje warning')
log.error('mensaje error')
log.critical('mensaje critical')

By default, it logs from WARNING to CRITICAL messages. If you want to change it, you can call log.SetLevel('debug') to log every message.

Made by Juan Ignacio De Nicola. Feel free to redistribute or modify it as you wish.

Project details


Download files

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

Source Distribution

rflogger_jdenicola-0.0.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

rflogger_jdenicola-0.0.1-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page