Skip to main content

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

python_7Z3AFD1Nlw.png

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 PyQt-Logger

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

QtLogger-1.0.0-py3-none-any.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

QtLogger-1.0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file QtLogger-1.0.0-py3-none-any.tar.gz.

File metadata

  • Download URL: QtLogger-1.0.0-py3-none-any.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for QtLogger-1.0.0-py3-none-any.tar.gz
Algorithm Hash digest
SHA256 6713b4bd587ae5a5613de7bad71b1d713b8194cae61157b534e0c9d7621c7d33
MD5 bcea43189225a56f9dffc8fea552b80f
BLAKE2b-256 c17b6e7b226e37b363978b6b9a9acc3f4d03285a6f486531f169a7ded8202134

See more details on using hashes here.

File details

Details for the file QtLogger-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: QtLogger-1.0.0-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

Hashes for QtLogger-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 934d55afbba160328294ae475faa9f4ff844ae37e1467500b7ccc0277e0026f1
MD5 d3988ca720f1b379b15efe4a810d1c9c
BLAKE2b-256 47f446de316e5c243c96ab86e81b8cc85ebc00681201e028c946fd7c596e5a91

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page