Skip to main content

Basic logging helpers.

Project description

log2me

Basic logging helpers.

Installation

python -m pip install log2me

Usage

Include the logging settings into your model and, at application start-up time, initialize the loggers.

from pydantic_settings import BaseSettings
from log2me import LogSettings, get_engine


class AppSettings(BaseSettings):
    # ...
    logs: LogSettings = Field(
        description="Logging settings.",
    )
    # ...


settings = AppSettings()
setup_logging(settings.logs)

Development

Start by creating a virtual environment and installing the dependencies. If you have a make command available, you can run make init after the virtual environment is created and activated. Otherwise, you can run the following commands:

python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[dev]

On Windows, to be able to serve the documentation, you may also need to install the cairo2 package:

pip install pipwin
pipwin install cairocffi

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

log2me-0.1.0.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

log2me-0.1.0-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

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