Skip to main content

A better, simple logger for python

Project description

BetterPythonLogger

A better python logger for better logging.

Usage

from BetterPythonLogger import Logger

logger = Logger.Logger("test")

logger.debug("This is a debug message")

alt text

By default this while create a new log file in the log directory

you can add a file handler to the logger

from BetterPythonLogger import Logger

logger = Logger.Logger("test")

logger.addFileHandler("<filename>", "<logger_name> here will be test")

You can add a stream handler to the logger

from BetterPythonLogger import Logger

logger = Logger.Logger("test")

logger.addStreamHandler("<logger_name> here will be test")

You can add a logger to the logger

from BetterPythonLogger import Logger

logger = Logger.Logger("test")

logger.addLogger("<logger_name>")

This will add a stream handler and a file handler to the newly created logger

If you don't want a file handler you can say noFile=True in the constructor or in the addLogger method

If you don't use any name we will use the name used to create the class.

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

BetterPythonLogger-1.1.3.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

BetterPythonLogger-1.1.3-py3-none-any.whl (4.6 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