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.

Files for log-factory, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size log_factory-0.1.1-py2.py3-none-any.whl (3.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size log_factory-0.1.1.tar.gz (1.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page