A simple logger for PyQt6 that also has a nice UI
Project description
PyQt-Logger
A small widget to show some logs with basic syntax
Features
-
Show logs with different colors based on their log level
-
Customizable log level colors
-
Auto archive the logs
-
Ability to read and display older logs
Installation
pip install QtLogger
Usage
Importing
from QtLogger import QtLogger
Full usage example
from QtLogger import QtLogger
from PyQt6.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("QtLogger Example")
self.resize(500, 500)
self.central_widget = QWidget()
self.setCentralWidget(self.central_widget)
self.layout = QVBoxLayout()
self.central_widget.setLayout(self.layout)
self.button = QPushButton("Log something")
self.button.clicked.connect(self.log_something)
self.layout.addWidget(self.button)
self.logger = QtLogger()
self.layout.addWidget(self.logger)
def log_something(self):
self.logger.log("This is a log", "info")
app = QApplication([])
window = MainWindow()
window.show()
app.exec()
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file QtLogger-1.0.3-py3-none-any.whl.
File metadata
- Download URL: QtLogger-1.0.3-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eddad8741a5db26b73838cb7bddf36841c43dc63b2e1d94a6d861b4d72623eb
|
|
| MD5 |
f16d89c2e2075294e211153e1f2063bf
|
|
| BLAKE2b-256 |
ff238549aca8f7054ff0efbec19be627bc20c663f5ec64836e0930c8b04b5afb
|