Skip to main content

Quick and easy logging initialization

Project description

Logfast

Purpose

Just a simple python package which does logging initialization in a certain way.

17|12|19|00:18:58|+0100  14474:MainThread  INFO       |__init__.py.21  |   This is an example
17|12|19|00:18:58|+0100  14474:MainThread  WARNING    |__init__.py.22  |   Another one

As one can see it provides the filename where the log has been created, the Process ID , the Thread Name, and the full time (including). This is a package I created for my own benefit, as i found myself tired of always doing the same logging initalization.

Now i can just pip install logfast wherever i am.

Most likely you will want to a have different logging format than me(so this package might be of no use to you). But if you want the same format feel free to use it.

Installation

pip install logfast

Usage Guide

Make sure this is the first module you import in your application. This makes sure no other call is made first to logging. Otherwise other modules/libraries might overwrite the logging settings. This allows you to have multiple application entrypoints but have the same logging configuration.

import logfast

logger = logfast.getLogger()


logger.info("This is an example")
logger.warning("Another one")

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

logfast-0.3.2.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distributions

logfast-0.3.2-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

logfast-0.3.2-py2-none-any.whl (3.2 kB view hashes)

Uploaded Python 2

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