Skip to main content

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 Enum to 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-in logging module.
  • 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

mapaction_logging_module-0.2.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapaction_logging_module-0.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file mapaction_logging_module-0.2.0.tar.gz.

File metadata

File hashes

Hashes for mapaction_logging_module-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ab041de50678320b98729a5f7722ea6e04879e9994dc75690f999c9327790cd5
MD5 6f797e341cd33624e3e34131e792480a
BLAKE2b-256 7793a7bf01eff6aff3f7eb78c64d74f1ac2fd2f0f4e92a42a121545a99eb686f

See more details on using hashes here.

File details

Details for the file mapaction_logging_module-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mapaction_logging_module-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eea7f08ba78454560afa649bd7922302f09d2293ed57704cef2026430ea5004
MD5 95b0f1e0f2ac8e04e87847233af3be6f
BLAKE2b-256 fc39308abeb24884fe8c3a59fae2542996d67f7ca19c04f19cf089c6abebc082

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page