Skip to main content

No project description provided

Project description

# log_factory

This is a factory for setting up sensible defaults for the python logging module, including:

* configuration of format and default level
* ability to add a file handler with different log level
* helper to set the log level
* an ArgumentParser that can be inherited

## Usage

```python
import log_factory
import logging

log_factory.create()
log_factory.set_log_level(logging.DEBUG)
log_factory.add_file_handler('out.log')

logger = log_factory.get_logger('example')

logger.info('hello!')
```

## Installation

From PIP:

```bash
pip install log_factory
```

Or pulled from git master:

```bash
pip install git+https://github.com/colinp85/log_factory
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
log_factory-0.1.1-py2.py3-none-any.whl (3.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3
log_factory-0.1.1.tar.gz (1.7 kB) Copy SHA256 hash SHA256 Source None

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 SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page