A structured logging module for MapAction applications with a Dashboard
Project description
MapAction Logging Module
This module provides a structured and flexible way to log events in your MapAction applications. It includes a Streamlit dashboard for visualizing and filtering log data.
Features
- Status Codes: Uses an
Enumto define clear status codes. - Detailed Logging: Captures timestamps, country, task name, status code, log message, and additional data.
- Database Storage: Logs events to a SQLite database.
- Integration with Python's
logging: Uses the built-inloggingmodule. - Streamlit Dashboard: Visualize and filter log data.
Installation
pip install mapaction-logging-module
Usage
1. Logging events:
from mapaction_logging import log_event, StatusCode
log_event(
country="BLZ",
task_name="my_task",
status_code=StatusCode.SUCCESS,
log_message="Task completed successfully!",
additional_data={"details": "Some extra information"}
)
2. Running the dashboard:
streamlit run mapaction_logging/dashboard/mapaction_logging_app.py
Contributing
Contributions are welcome! See the GitHub repository for more details.
License
MIT License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mapaction_logging_module-0.2.1.tar.gz.
File metadata
- Download URL: mapaction_logging_module-0.2.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3663014b5137839b5c56f2c2a1514aee43f7eda6d24704a359ec94dc2bf4dc06
|
|
| MD5 |
04852a468a68ed0bf73c76de49d15a79
|
|
| BLAKE2b-256 |
dfacd450489865e9ed4764b0fcdfaf005d4cbb740f183c29817930a1d9416b58
|
File details
Details for the file mapaction_logging_module-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mapaction_logging_module-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9518a3dbe2ba0256e67dbaa6ab96653c8bc13f7e8b994ae3f91c2ff49949a46c
|
|
| MD5 |
550a8062c66c78545111f44146a90f35
|
|
| BLAKE2b-256 |
c2c3f91ea6a1212e434467f64aa093e542f3feb8bb24052a6a59ff109bdede35
|