Skip to main content

A convenience package to add a flexible logger easily.

Project description

README

This package shall make logging easier. These are the goals:

  • Make setup of a logger with time-stamped log messages a no-brainer
  • Make adding/removing additional log files a one-liner

Use it like this:

from flexlog import cleanlogger

log = cleanlogger.CleanLogger("My Cool Module Name, Version 42")

# Log to console
log.info("Hello World!")

# Add a file
log.add_filelogger("mylogging.log")
log.debug("Log level of files is debug by default, but you can give it as parameter, too.")

import logging
log.add_filelogger("problemsonly.log", loglevel = logging.WARNING)

# Remove a file
log.remove_filelogger("mylogging.log")

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

flexlog-1.5.0.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

flexlog-1.5.0-py3-none-any.whl (4.2 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