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.

Source Distribution

log_factory-0.1.1.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

log_factory-0.1.1-py2.py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 2 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