Skip to main content

Simple Log Factory

Project description

Simple log factory

This package is a wrapper for a simple log factory.

Usage

Creates a logger that will write to console, with level set to DEBUG.

from simple_log_factory import log_factory

logger = log_factory("my_log1")

Creates a logger that will write to console and to file, with level set to DEBUG. The file log will rotate daily, with timestamp added.

from simple_log_factory import log_factory

logger = log_factory("my_log1", log_file="./my_log_dump.log")

Creates a logger that will write to console and to file, with level set to DEBUG. This log file will be unique.

from simple_log_factory import log_factory

logger = log_factory("my_log1", log_file="./my_log_dump.log", rotate_file_by_day=False)

Creates a logger that will write to console, with level set to DEBUG. This type of logger (console) will be unique. (That's a workaround to log entries duplicated when more than one logger is configured to the same output)

from simple_log_factory import log_factory

logger = log_factory("my_log1", unique_handler_types=True)

Notes

This is a very early stage project, just a few functionalities. If you find any bugs, please contact me (or feel free to open an issue on Github).

Github Project: https://github.com/brenordv/log-factory-package

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

simple_log_factory-0.0.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

simple_log_factory-0.0.1-py3-none-any.whl (4.1 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