Cerbose
Current version: v2.0.1
Cerbose is a simple, highly customisable, cross-platform Python logging
library with:
- Customisable output style
- A tagging system with user-defined tags and multiple tags per message
- File logging
- Automatic text alignment
- Helpful functions, such as cerbar, a progress bar generator
Links
Showcase
[NONE]: I like frogs. [OK] : I like frogs. [NOTE]: I like frogs. [WARN]: I like frogs. [ERROR]: I like frogs. [DEBUG]: I like frogs. [INFO] : I like frogs. [QUERY]: I like frogs. [INPUT]: I like frogs. [LOAD] : I like frogs. [PAUSE]: I like frogs. [STAT]: [############--------] I like frogs. [FATAL]: I like frogs. [TRACE]: I like frogs. [PROC] : I like frogs. [NONE] : Repeat explained in README/docs. I still like frogs. [DEBUG][INFO]: Double tag test. I still like frogs. [DEBUG] : Text colour test. I still like frogs. [20:37:30][DEBUG] : Timestamp test. I still like frogs. [WARN]: Multi-line test. : I still like frogs. [WARN][QUERY]: Give feedback on the frogs. > awesome [INFO] : You typed awesome! [QUERY] : So, would you say you like frogs? > y [INFO] : Nice!
Features
- cprint: This is the function that makes a log message. It takes a tag and the log message text. It can also take a log file, text colour, extra tags, and be timestamped. The log message is automatically padded to align with the other log messages. There is also mprint, which has multiline support.
-
cerbar:
This generated a text progress bar and returns it as a string. Optionally, it can also have
a progress number (e.g.,
2/10) and/or a percentage. - cquery: Takes user input like a log message.
Configuration
Cerbose's config allows you to configure the following:
- Custom tags (text, name, colour)
- Exisiting tags (text, name, colour)
- Symbols (e.g., brackets, progress)
- Default log file
- Timestamp format
- …More!