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
```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
```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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for log_factory-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b56d342e5f269807a3bdf68aa4942f2ba3e7cb6328068ab5f4b7fce2c60262a8 |
|
MD5 | d5fe2f5ba3ab27e898ab4cae8d059834 |
|
BLAKE2b-256 | 0dda50820cbc1421a3f66cdd1c2125e2388fb3999a1b8fed703b9640485b3b1a |