.. this file is kept in the docs\source directory and COPIED to the project root directory.
.. DO NOT edit the copy in the project root directory.
balsa (logging utility)
=======================
Simple to use package that sets up Python logging. With just a few lines of code get well formatted logging to the
console, log file, popup windows and exception services.
Here is a short `Presentation on Balsa <https://www.abel.co/balsa_lightening_talk.pdf>`_.
Installation
============
.. code-block:: console
pip install balsa
Major Features
==============
- Simple to use. Add full-featured Python logging in just a few lines of code.
- Sane default log levels. Single `verbose` flag. (All levels can be overridden if desired.)
- Both console (stdout) and GUI (popup window) support.
- Log file support. Uses `appdirs` for log file paths.
- Structured logging via `yasf.sf()` (optional - you can still use simple strings).
- `Sentry <http://www.sentry.io/>`_ support. Just provide your `Sentry DSN <https://docs.sentry.io/quickstart/#configure-the-dsn>`_.
- Informative log message formatting (or you can change it if you like).
- ISO 8601 timestamp format (with fractional seconds).
- Cross platform (Windows, Linux, MacOS). Pure Python.
- Multiprocessing support.
- `AWS CloudWatch logs <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html/>`_ support.
Structured logs enable `CloudWatch Logs Insights`.
Simple Example
==============
.. code:: python
from balsa import get_logger, Balsa
application_name = 'example'
log = get_logger(application_name)
def main():
balsa = Balsa(application_name, 'james abel')
balsa.init_logger()
log.error('my error example')
This will yield output of this form:
.. code-block:: console
2021-10-24T10:49:04.150790-07:00 - example - balsa_simple_example.py - 12 - main - ERROR - my error example
Where did the name come from?
=============================
Balsa lumber is very soft and light, with a coarse, open grain.
The Balsa package is light weight, malleable, and open source.
Raw data
{
"_id": null,
"home_page": "https://github.com/jamesabel/balsa",
"name": "balsa",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "logging, utility",
"author": "James Abel",
"author_email": "j@abel.co",
"download_url": "https://github.com/jamesabel/balsa/archive/master.zip",
"platform": null,
"description": "\r\n.. this file is kept in the docs\\source directory and COPIED to the project root directory.\r\n.. DO NOT edit the copy in the project root directory.\r\n\r\nbalsa (logging utility)\r\n=======================\r\n\r\nSimple to use package that sets up Python logging. With just a few lines of code get well formatted logging to the\r\nconsole, log file, popup windows and exception services.\r\n\r\nHere is a short `Presentation on Balsa <https://www.abel.co/balsa_lightening_talk.pdf>`_.\r\n\r\nInstallation\r\n============\r\n\r\n.. code-block:: console\r\n\r\n pip install balsa\r\n\r\nMajor Features\r\n==============\r\n- Simple to use. Add full-featured Python logging in just a few lines of code.\r\n- Sane default log levels. Single `verbose` flag. (All levels can be overridden if desired.)\r\n- Both console (stdout) and GUI (popup window) support.\r\n- Log file support. Uses `appdirs` for log file paths.\r\n- Structured logging via `yasf.sf()` (optional - you can still use simple strings).\r\n- `Sentry <http://www.sentry.io/>`_ support. Just provide your `Sentry DSN <https://docs.sentry.io/quickstart/#configure-the-dsn>`_.\r\n- Informative log message formatting (or you can change it if you like).\r\n- ISO 8601 timestamp format (with fractional seconds).\r\n- Cross platform (Windows, Linux, MacOS). Pure Python.\r\n- Multiprocessing support.\r\n- `AWS CloudWatch logs <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html/>`_ support.\r\n Structured logs enable `CloudWatch Logs Insights`.\r\n\r\nSimple Example\r\n==============\r\n\r\n.. code:: python\r\n\r\n from balsa import get_logger, Balsa\r\n\r\n application_name = 'example'\r\n\r\n log = get_logger(application_name)\r\n\r\n\r\n def main():\r\n balsa = Balsa(application_name, 'james abel')\r\n balsa.init_logger()\r\n log.error('my error example')\r\n\r\n\r\nThis will yield output of this form:\r\n\r\n.. code-block:: console\r\n\r\n 2021-10-24T10:49:04.150790-07:00 - example - balsa_simple_example.py - 12 - main - ERROR - my error example\r\n\r\nWhere did the name come from?\r\n=============================\r\nBalsa lumber is very soft and light, with a coarse, open grain.\r\nThe Balsa package is light weight, malleable, and open source.\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "logging utility",
"version": "0.21.0",
"project_urls": {
"Download": "https://github.com/jamesabel/balsa/archive/master.zip",
"Homepage": "https://github.com/jamesabel/balsa"
},
"split_keywords": [
"logging",
" utility"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "91e5da92d2912633932c0e5c9cb5f10104d56c6a5bd8b96630acb8f37f40f27b",
"md5": "009673453f709f9f94d8127633fd78eb",
"sha256": "a3c6ace609c795b641d02aa597036c14715a365d44df21300f9ea8e09cdbb524"
},
"downloads": -1,
"filename": "balsa-0.21.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "009673453f709f9f94d8127633fd78eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 14909,
"upload_time": "2025-01-03T06:41:47",
"upload_time_iso_8601": "2025-01-03T06:41:47.004754Z",
"url": "https://files.pythonhosted.org/packages/91/e5/da92d2912633932c0e5c9cb5f10104d56c6a5bd8b96630acb8f37f40f27b/balsa-0.21.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-03 06:41:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jamesabel",
"github_project": "balsa",
"travis_ci": false,
"coveralls": true,
"github_actions": false,
"lcname": "balsa"
}