!!!ATTENTION!!! In connection with the increase in capabilities and functionality, the library has changed its name! It is now called Mighty Logger. This repository is no longer maintained by the author!
Qt_Сolored-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.
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 status
- Description of the log entry status
- 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.
Important releases
See the important releases (possible spoilers)
- v0.1.0 - First official release (complete basic HTML logger)
- v0.2.0 - Structural update (added basic console logger with HTML base)
- v0.3.0 - Background update (added background for log entries)
- v0.4.0 - Buffer update (added text buffer)
- v0.5.0 - PROJECT NAME CHANGED
!!!ATTENTION!!! In connection with the increase in capabilities and functionality, the library has changed its name! It is now called Mighty Logger. This repository is no longer maintained by the author!
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.0Unless 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
Installation
Despite the fact that the library was originally developed for use in PyQt, it does not require PyQt to be installed, since this framework for outputting to Text fields, which support not only Plain Text, uses HTML and this library simply simplifies the logging process, since the creation process already formatted strings is registered in this library.
!!!ATTENTION!!! In connection with the increase in capabilities and functionality, the library has changed its name! It is now called Mighty Logger. This repository is no longer maintained by the author!
To install the library, enter the command:
pip install qt-colored-logger
Usage
This is the simplest example of using the library:
from qt_colored_logger.text import TextBuffer
from qt_colored_logger.logger import Logger
if __name__ == "__main__":
buf = TextBuffer(115)
logger = Logger(program_name="Test", text_buffer=buf)
logger.MESSAGE(status_message_text="OK", message_text="Outputting the message")
The outputs in console will contain the following text (GitHub, PyPi and possibly some other sites do not support displaying colors in Markdown - use resources that support them, such as PyCharm):
-Test?entry> $███████████████^████@███████:██████████:█████:█████████:█████
-?entry> *2023-04-09 12:37:07.198496 #STATUS: OK @MESSAGE - Outputting the message
See the USAGING.md file for more details.
Additional functionality
!!!ATTENTION!!! In connection with the increase in capabilities and functionality, the library has changed its name! It is now called Mighty Logger. This repository is no longer maintained by the author!
Data
See the DATA.md file.
Troubleshooting
!!!ATTENTION!!! In connection with the increase in capabilities and functionality, the library has changed its name! It is now called Mighty Logger. This repository is no longer maintained by the author!
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" |
Metadata
Release files for qt-colored-logger 0.4.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qt_colored_logger-0.4.0.1.tar.gz | 27.4 kB | Without provenance | Details for qt_colored_logger-0.4.0.1.tar.gz |
Release files / qt_colored_logger-0.4.0.1.tar.gz
| Download URL | qt_colored_logger-0.4.0.1.tar.gz |
|---|---|
| Size | 27.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8834e019f1b84c5d75dd7b4dca279e54f6c7397fa134a38d0ab9aeb1a3aa881
|
|
BLAKE2b-256 checksum How to use checksums |
0a389ad953382e160a10d9acb3c160095fc7aabd09e70b87c519c57f533f4752
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for qt-colored-logger 0.4.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.