Loghandler
Project description
Logging Module
This library can handle colored log-output and write directly into a logfile.
Init
#!/usr/bin/env python3
import logbuddy
log = logbuddy.log()
Loglevel
At the moment there are a few loglevels defined by default.
- Info
- Warning
- Error
- Pass
- Debug
log.Pass("I am a pass-message")
log.Warn("I am a warning-message")
log.Error("I am an error-message")
log.Debug("I am a debug-message")
log.Info("I am an info-message")
Change the color of the levels
log.Info("I am an info-message")
log.setInfo("\x1b[1;36m")
log.Info("And now I have a different color")
If you don't like colors
log.setColor(False)
Need a logfile?
log.setLogfile("somelogfile")
Need a logfile with date?
log.setLogfile("somelogfile")
log.setLogfileDate(True)
Future Plans
- Creating your own loglevels
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
logbuddy-0.0.1.4.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for logbuddy-0.0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0f35dd4d61943a831e3d6a9863655605f14fdd2e9c8e13233bc2f641dbd504 |
|
MD5 | ae2bdd1c8e4dc34f36c0348a7dab2de8 |
|
BLAKE2b-256 | 9f82fedd940d3a1cbad24d4ff71e18d1c15f639ef991ddf8c9f26f5f172262a7 |