Simple logs for any app
Project description
Logbless
Logbless is a simple file-based real-time log viewer.
Installation
macos/linux
wget -qO- https://astral.sh/uv/install.sh | sh
uv venv --python 3.12
source .venv/bin/activate
uv pip install logbless
windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uv venv --python 3.12
.venv\Scripts\activate
uv pip install logbless
Requirements
Your logs must follow the format:
_log_format = "%(asctime)s - [%(levelname)s] - %(name)s - (%(filename)s).%(funcName)s(%(lineno)d) - %(message)s"
Example with logging
import logging
_log_format = "%(asctime)s - [%(levelname)s] - %(name)s - (%(filename)s).%(funcName)s(%(lineno)d) - %(message)s"
logging.basicConfig(
level=logging.INFO, format=_log_format, encoding="utf-8", filename="app.log"
)
Example log entry:
2025-01-14 07:25:00,779 - [INFO] - aiogram.event - (dispatcher.py).feed_update(172) - Update id=126061252 by bot id=6101975097
Usage
-
Initialize the application:
Before starting the application, create a configuration file by running:
uv run logbless init
After executing the command, a file named
logbless_conf.yaml
will be created. You need to edit this file before running the application.Example of
logbless_conf.yaml
:authentication: login: admin # Login for accessing the web interface password: admin # Password for accessing the web interface host: 127.0.0.1 # Host where the server will run log_filename: logs.log # Path to the log file to be viewed path: /logs # URL path for accessing logs port: 8070 # Port to start the server title: Logbless Log viewer # Title of the web page
Adjust the file according to your needs.
-
Run the application:
After editing the configuration file, start the application by running:
uv run logbless run
The application will start and be available at
http://127.0.0.1:8070
(or another address if you modified thehost
andport
settings).
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
Built Distribution
File details
Details for the file logbless-0.1.4.tar.gz
.
File metadata
- Download URL: logbless-0.1.4.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 091c0be4e1019358e68289250ab3008df2ca5301312df3c768bea5a24feb24a9 |
|
MD5 | d304f14783b12779234bcdfad88548c5 |
|
BLAKE2b-256 | f75dca49b504d3e4c637b4acd0f948c22e09b845dfdad0211b67b550880dee11 |
File details
Details for the file logbless-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: logbless-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5f9c0b4a995b095bbd2085b5a8a5e48b4c3ee929eb0fd691642ee733f27c478 |
|
MD5 | 721b682994197bbbae74e22e1e1bf162 |
|
BLAKE2b-256 | ad2151dfef101d0e57ce5a40038236631160f3aadaed4d93e4484618a867f31f |