Mighty functional logger
Project description
Mighty Logger
Content
Preamble
I often came across the opinion that it is better to use not standard output to the console, but full-fledged logging... However, the standard libraries do not provide exactly what I need... Therefore, I decided to make my own library! Which will implement the functionality I need.
I was inspired by the colored-logs library.
This library has been renamed to "Mighty logger", but this library used to be called "Qt Colored logger". You can search for old commits in this repository, but you can download the old build from the link.
Overview
The library implements the formation of a beautifully formatted colored text, similar to a log, which has all the necessary information:
- Device name and registered profile, system name, etc. (this data is displayed only once at the beginning of the logging)
- Log entry time
- Log entry category
- Log entry type
- Entry message
Any information to the output can be turned off (according to the default, everything is included). It is also possible to change the output settings during the logging process. It is possible to change the colors of the foreground text and the background, icons and animations.
LICENSE
The full text of the license can be found at the following link.
Copyright © 2023 Kalynovsky Valentin. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
Important releases
See the important releases
- v0.0.1 - Alpha-release (the very first version of the simplest Logger has been published)
- v0.0.2 - Little update (added multiple entry types and colors)
- v0.0.3 - Types update (added even more multiple entry types and colors)
- v0.0.4 - Color update (added the entire X11 color table and reworked the color system)
- v0.1.0 - "First release" update (complete basic HTML logger)
- v0.2.0 - Structural update (added basic console logger with HTML base)
- v0.2.1 - Protections update (hidden part of the functionality)
- v0.3.0 - Background update (added background for log entries)
- v0.4.0 - Buffer update (added text buffer)
- v0.5.0 - Unifying update (console and HTML are combined into one class)
- v0.5.1 - Hints update (added hint symbols (icons) near log entries status)
- v0.6.0 - Progress update (added start of some log entries in threads (process))
- v0.6.1 - Animation update (extended animations in processes)
- v0.7.0 - "Buffer improvement" update (buffer development completed)
- v0.7.1 - Modding update (buffer modification added - sorting, searching and selecting)
- v0.7.2 - Categories update (separated the entry category from the type)
- v0.8.0 - Export update (added conversion to csv)
- v0.9.0 - Extension update (made wheel format and instruction of toml)
- v0.9.1 - Documenting update (documented library)
- v0.9.2 - Feature update (made optimizations)
- v0.9.3 - Web docs update (added generation of web docs)
- v1.0.0 - Completion of logger development (logger development completed)
- v1.1.0 - Font update (added a class that formats text outside the logger)
Features
- Support for a large number of logger entry types (empty, entry: debug, debug_performance, performance, event, audit, metrics, user, message, info, notice, warning, error, critical, resolved, unresolved)
- Support for five working environments (CONSOLE, PLAIN_CONSOLE, HTML, MARKDOWN, PLAIN)
- Provides publisher methods
- Provides to sort the logs
- Provides to search the logs
- Provides to select the desired logs
- Provides to export logs to csv
- Implemented own Text Buffer
- Provided the ability to control the Buffer
- Logs can be saved and loaded
- Implemented wrapper method for Python input()
- You can run logging Processes
- You can run logging Timers
- Implemented a simplified Logger class
- When creating a Logger, an entry is created about the characteristics of the system
- Show time of logging for every entry log
- Provided are more than 20 animations for indefinite processes and 6 for definite processes
- Provided are ANSI escape code table
- Provides colors in RGB, HEX, ANSI
- Provided are 4 sorting options (by time, by reverse time, by category, by type)
- Provided are 5 exceptions
Installation
To install the library, enter the command:
pip install mighty_logger
Usage
This is the simplest example of using the library:
from mighty_logger import Logger
if __name__ == "__main__":
logger = Logger()
logger.message("Hello world!")
print("\n".join(logger.might.buffer))
The outputs in console will contain the following text:
-Unknown?entry> $DESKTOP-8KG0R64:User:Windows:10.0.19045:64bit:WindowsPE:AMD64 -?entry> *2023-07-04 21:12:05.919593 📝 #STATUS: @MESSAGE - Hello world!
Troubleshooting
All functionality of the library has been tested by me, but if you have problems using it, the code does not work, have suggestions for optimization or advice for improving the style of the code and the name - I invite you here and here.
Authors
Kalynovsky Valentin "Ideological inspirer and Author" |
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
Built Distribution
File details
Details for the file mighty_logger-1.0.0.tar.gz
.
File metadata
- Download URL: mighty_logger-1.0.0.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db037945fde0afdcc5627779ff11ff525e4697c2db5da9ad0fc7555cc757cd3a |
|
MD5 | bb61254e68f10d7c52cc1ab2c11718f2 |
|
BLAKE2b-256 | 6e9fc447f51bf1004fd2c2a5c469bd3b142b18675de19f46f375d1813af3c549 |
File details
Details for the file mighty_logger-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: mighty_logger-1.0.0-py3-none-any.whl
- Upload date:
- Size: 40.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | beba49af17427b370781047abb78eac03d147724d060e6f7d693e6bed77f9c19 |
|
MD5 | e3002273760b73660d777a6ca744b120 |
|
BLAKE2b-256 | 12cd5b98a82a4f6969611dfe209b8561792d7e4c5ccdf54e6dcf77a6d1879aa8 |