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
```
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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for log_factory-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d78bd00b96a39a721ea0b4e880062641cbcb3cf1272008ceb829dea4980d822c |
|
MD5 | e97609fe10a8edd7acd3d0769136ff36 |
|
BLAKE2b-256 | d6bf090874556d01656386681661a502315714e9d8a34c4698a549673fa987c2 |