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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file log_factory-0.1.1.tar.gz.

File metadata

  • Download URL: log_factory-0.1.1.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for log_factory-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5d93f8bc4a8260d5a23c23db23cd7449b79cc75e79249e3aef21154f2a8eb80b
MD5 3f90e63dbf7feafbeb98671ede2d3c96
BLAKE2b-256 5362135815bb56e0695f2d5552dd9eb9f828b39299fe7380fda78ee1c7498eba

See more details on using hashes here.

File details

Details for the file log_factory-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for log_factory-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d78bd00b96a39a721ea0b4e880062641cbcb3cf1272008ceb829dea4980d822c
MD5 e97609fe10a8edd7acd3d0769136ff36
BLAKE2b-256 d6bf090874556d01656386681661a502315714e9d8a34c4698a549673fa987c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page