Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/billloic/advanced-logger
A customize-able logger
https://github.com/billloic/advanced-logger
Last synced: about 10 hours ago
JSON representation
A customize-able logger
- Host: GitHub
- URL: https://github.com/billloic/advanced-logger
- Owner: BillLoic
- Created: 2024-08-15T09:46:56.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T10:20:11.000Z (3 months ago)
- Last Synced: 2024-08-15T11:36:57.614Z (3 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advanced logger
it provides colorful printing and it is be able to customize
# Install
Run command:
`pip install advanced-logger`# Try it
```python
import loggerlogger.debug("Hello")
```# Do something andvanced
1. Colorful printing
Write this line before any action
```python
import logger as loglogger = log.getLogger("test.test", colored=True)
logger.debug("Hello")
```2. Write your own handler
If you want to pipe message to standard error output, you do:
```python
from logger.handler import FileObjectHandler
import logger as log
import sysclass StdErrHandler(FileObjectHandler):
def __init__(self):
super().__init__(sys.stderr)logger = log.getLogger("test", handler=StdErrHandler())
logger.debug("test")
```