logbless


Namelogbless JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummarySimple logs for any app
upload_time2025-01-19 04:31:35
maintainerNone
docs_urlNone
authorkesha1225
requires_python>=3.12
licenseNone
keywords logs logging log viewer real-time monitoring fastapi lightweight
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Logbless

**Logbless** is a simple file-based real-time log viewer.

---

### Installation

#### macos/linux
```shell
wget -qO- https://astral.sh/uv/install.sh | sh
uv venv --python 3.12
source .venv/bin/activate
uv pip install logbless
```

#### windows
```shell
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:

```python
_log_format = "%(asctime)s - [%(levelname)s] - %(name)s - (%(filename)s).%(funcName)s(%(lineno)d) - %(message)s"
```

Example with logging

```python
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:

```text
2025-01-14 07:25:00,779 - [INFO] - aiogram.event - (dispatcher.py).feed_update(172) - Update id=126061252 by bot id=6101975097
```

---

### Usage

1. **Initialize the application:**

   Before starting the application, create a configuration file by running:

   ```shell
   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`:

   ```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.

2. **Run the application:**

   After editing the configuration file, start the application by running:

   ```shell
   uv run logbless run
   ```

   The application will start and be available at `http://127.0.0.1:8070` (or another address if you modified the `host` and `port` settings).


---
![view.png](assets/view_eng.png)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "logbless",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "logs, logging, log viewer, real-time, monitoring, FastAPI, lightweight",
    "author": "kesha1225",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/f7/5d/ca49b504d3e4c637b4acd0f948c22e09b845dfdad0211b67b550880dee11/logbless-0.1.4.tar.gz",
    "platform": null,
    "description": "# Logbless\n\n**Logbless** is a simple file-based real-time log viewer.\n\n---\n\n### Installation\n\n#### macos/linux\n```shell\nwget -qO- https://astral.sh/uv/install.sh | sh\nuv venv --python 3.12\nsource .venv/bin/activate\nuv pip install logbless\n```\n\n#### windows\n```shell\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\nuv venv --python 3.12\n.venv\\Scripts\\activate\nuv pip install logbless\n```\n\n---\n\n### Requirements\n\nYour logs must follow the format:\n\n```python\n_log_format = \"%(asctime)s - [%(levelname)s] - %(name)s - (%(filename)s).%(funcName)s(%(lineno)d) - %(message)s\"\n```\n\nExample with logging\n\n```python\nimport logging\n\n_log_format = \"%(asctime)s - [%(levelname)s] - %(name)s - (%(filename)s).%(funcName)s(%(lineno)d) - %(message)s\"\nlogging.basicConfig(\n  level=logging.INFO, format=_log_format, encoding=\"utf-8\", filename=\"app.log\"\n)\n```\n\nExample log entry:\n\n```text\n2025-01-14 07:25:00,779 - [INFO] - aiogram.event - (dispatcher.py).feed_update(172) - Update id=126061252 by bot id=6101975097\n```\n\n---\n\n### Usage\n\n1. **Initialize the application:**\n\n   Before starting the application, create a configuration file by running:\n\n   ```shell\n   uv run logbless init\n   ```\n\n   After executing the command, a file named `logbless_conf.yaml` will be created. You need to edit this file before running the application.\n\n   Example of `logbless_conf.yaml`:\n\n   ```yaml\n   authentication:\n     login: admin             # Login for accessing the web interface\n     password: admin          # Password for accessing the web interface\n   host: 127.0.0.1            # Host where the server will run\n   log_filename: logs.log     # Path to the log file to be viewed\n   path: /logs                # URL path for accessing logs\n   port: 8070                 # Port to start the server\n   title: Logbless Log viewer # Title of the web page\n   ```\n\n   Adjust the file according to your needs.\n\n2. **Run the application:**\n\n   After editing the configuration file, start the application by running:\n\n   ```shell\n   uv run logbless run\n   ```\n\n   The application will start and be available at `http://127.0.0.1:8070` (or another address if you modified the `host` and `port` settings).\n\n\n---\n![view.png](assets/view_eng.png)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Simple logs for any app",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/kesha1225/Logbless",
        "Repository": "https://github.com/kesha1225/Logbless"
    },
    "split_keywords": [
        "logs",
        " logging",
        " log viewer",
        " real-time",
        " monitoring",
        " fastapi",
        " lightweight"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ad2151dfef101d0e57ce5a40038236631160f3aadaed4d93e4484618a867f31f",
                "md5": "721b682994197bbbae74e22e1e1bf162",
                "sha256": "f5f9c0b4a995b095bbd2085b5a8a5e48b4c3ee929eb0fd691642ee733f27c478"
            },
            "downloads": -1,
            "filename": "logbless-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "721b682994197bbbae74e22e1e1bf162",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 7922,
            "upload_time": "2025-01-19T04:31:32",
            "upload_time_iso_8601": "2025-01-19T04:31:32.906057Z",
            "url": "https://files.pythonhosted.org/packages/ad/21/51dfef101d0e57ce5a40038236631160f3aadaed4d93e4484618a867f31f/logbless-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f75dca49b504d3e4c637b4acd0f948c22e09b845dfdad0211b67b550880dee11",
                "md5": "d304f14783b12779234bcdfad88548c5",
                "sha256": "091c0be4e1019358e68289250ab3008df2ca5301312df3c768bea5a24feb24a9"
            },
            "downloads": -1,
            "filename": "logbless-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "d304f14783b12779234bcdfad88548c5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 8038,
            "upload_time": "2025-01-19T04:31:35",
            "upload_time_iso_8601": "2025-01-19T04:31:35.109747Z",
            "url": "https://files.pythonhosted.org/packages/f7/5d/ca49b504d3e4c637b4acd0f948c22e09b845dfdad0211b67b550880dee11/logbless-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-19 04:31:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kesha1225",
    "github_project": "Logbless",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "logbless"
}
        
Elapsed time: 0.44185s