Skip to main content

Easy configure logging

Project description


This python library provides simple wrapper for standart logging module.

If you want something more than "logging.basicConfig", but don't want to read a lot of documentation and to write a lot of code.


You can find examples in ./examples directory

import logging
import easylogconfig

log = logging.getLogger(__name__)

# print messages to the stdout, add debug level
# or print messages to the syslog"example_tag")
# or print messages to the file without datetime but with thread names"/var/log/example.log", file_backup_count=30,
                   datetime=False, thread=True)"info message")
log.debug("debug message")

# output format:
# 2019-03-22/10:17:28 INFO    info message


Library provides one simple function auto with arguments:

  • formatter arguments:
    • debug=False: add debug messages to output?
    • thread=False: add thread names to messages?
    • datetime=True: add datetime to messages?
    • level=False: add level names to messages?
  • SysLogHandler arguments:
    • syslog_tag=None: if set to str, log messages to syslog with this tag
    • syslog_address="/dev/log": syslog server address
  • TimedRotatingFileHandler arguments:
    • file_name=None: if set to str, log messages to this tile
    • file_when="midnight": file rotating time
    • file_backup_count=7: keep last files

If you want to log messages to the stdout, don't pass syslog_tag or file_name arguments. If you want to log messages to the syslog server, pass syslog_tag argument. If you want to log messages to the file, pass file_name argument.


pip install -U easylogconfig
# or
pip install -U git+


make venv
sourve ./venv/bin/activate
make init-dev init

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 easylogconfig, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size easylogconfig-0.1.3-py2-none-any.whl (4.0 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size easylogconfig-0.1.3.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page