# PyQt-Logger
A small widget to show some logs with basic syntax
![python_7Z3AFD1Nlw.png](https://i.imgur.com/6h16OaY.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
```bash
pip install QtLogger
```
## Usage
> Importing
```python
from QtLogger import QtLogger
```
> Full usage example
```python
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()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Advik-B/PyQt-Logger",
"name": "QtLogger",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Logger,Qt,PyQt,Qt6,PyQt6,QtLogger",
"author": "Advik",
"author_email": "<advik.b@gmail.com>",
"download_url": "",
"platform": null,
"description": "\r\n# PyQt-Logger\r\n\r\nA small widget to show some logs with basic syntax\r\n\r\n![python_7Z3AFD1Nlw.png](https://i.imgur.com/6h16OaY.png)\r\n\r\n\r\n\r\n## Features\r\n\r\n\r\n\r\n- Show logs with different colors based on their log level\r\n\r\n- Customizable log level colors\r\n\r\n- Auto archive the logs\r\n\r\n- Ability to read and display older logs\r\n\r\n\r\n\r\n## Installation\r\n\r\n\r\n\r\n```bash\r\n\r\npip install QtLogger\r\n\r\n```\r\n\r\n\r\n\r\n## Usage\r\n\r\n\r\n\r\n> Importing\r\n\r\n```python\r\n\r\nfrom QtLogger import QtLogger\r\n\r\n```\r\n\r\n\r\n\r\n> Full usage example\r\n\r\n```python\r\n\r\nfrom QtLogger import QtLogger\r\n\r\nfrom PyQt6.QtWidgets import QApplication, QMainWindow, QPushButton, QVBoxLayout, QWidget\r\n\r\n\r\n\r\nclass MainWindow(QMainWindow):\r\n\r\n def __init__(self):\r\n\r\n super().__init__()\r\n\r\n self.setWindowTitle(\"QtLogger Example\")\r\n\r\n self.resize(500, 500)\r\n\r\n\r\n\r\n self.central_widget = QWidget()\r\n\r\n self.setCentralWidget(self.central_widget)\r\n\r\n\r\n\r\n self.layout = QVBoxLayout()\r\n\r\n self.central_widget.setLayout(self.layout)\r\n\r\n\r\n\r\n self.button = QPushButton(\"Log something\")\r\n\r\n self.button.clicked.connect(self.log_something)\r\n\r\n self.layout.addWidget(self.button)\r\n\r\n\r\n\r\n self.logger = QtLogger()\r\n\r\n self.layout.addWidget(self.logger)\r\n\r\n\r\n\r\n def log_something(self):\r\n\r\n self.logger.log(\"This is a log\", \"info\")\r\n\r\n\r\n\r\napp = QApplication([])\r\n\r\nwindow = MainWindow()\r\n\r\nwindow.show()\r\n\r\napp.exec()\r\n\r\n```\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A simple logger for PyQt6 that also has a nice UI",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/Advik-B/PyQt-Logger"
},
"split_keywords": [
"logger",
"qt",
"pyqt",
"qt6",
"pyqt6",
"qtlogger"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ff238549aca8f7054ff0efbec19be627bc20c663f5ec64836e0930c8b04b5afb",
"md5": "f16d89c2e2075294e211153e1f2063bf",
"sha256": "6eddad8741a5db26b73838cb7bddf36841c43dc63b2e1d94a6d861b4d72623eb"
},
"downloads": -1,
"filename": "QtLogger-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f16d89c2e2075294e211153e1f2063bf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6176,
"upload_time": "2023-05-21T12:14:40",
"upload_time_iso_8601": "2023-05-21T12:14:40.322023Z",
"url": "https://files.pythonhosted.org/packages/ff/23/8549aca8f7054ff0efbec19be627bc20c663f5ec64836e0930c8b04b5afb/QtLogger-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-21 12:14:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Advik-B",
"github_project": "PyQt-Logger",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "qtlogger"
}