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.2.tar.gz (4.2 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.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mapaction_logging_module-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e1cbb89e82fa08f139f15b040ca59df8e214b18b4c3be79d35347e868868becb
MD5 5e090a54ad12f777f11b7976827cfb9d
BLAKE2b-256 28f46681042dc0a6137eb029da65a3c0464b9f994dcbee1813a6c4e6bf7f4040

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mapaction_logging_module-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 119881675736033c45a32f9681990043dfe53fbce4d1c151ee5b608ad862f044
MD5 ca51dfa492057ae8c38e3cc09b59137a
BLAKE2b-256 4ab034d6fb33c024a2e356a727a8241df1e21e5a038760ac22a8a901b603f401

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