Skip to content

A simple and flexible Python logging utility with enhanced features for structured logging.

License

Notifications You must be signed in to change notification settings

douinc/dou-python-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dou-utils

Composition of utils for Dou Inc. projects.

DouCLI

Installs files for python formatting options.

Quickstart

# initiate project with `uv init`
# add dou-utils with `uv add dou-utils`
dou install formatting

DouLogger

A simple and flexible Python logging utility with enhanced features for structured logging.

Features

  • Easy-to-use logging methods: info, debug, warning, error.
  • Structured logging support: Pass additional metadata with your log messages.
  • Configurable logging levels: Control the verbosity of your logs.

Installation

Install DouLogger directly from the GitHub repository:

pip install git+https://github.com/douinc/[email protected]

Quick Start

Import the logger from the dou package:

from dou import logger

Basic Logging

Log messages at different severity levels:

logger.info("This is an info message")
logger.debug("This is a debug message")
logger.warning("This is a warning message")
logger.error("This is an error message")

Structured Logging

Include additional metadata in your logs for better traceability:

logger.info(
    message={
        "event": "user_signup",
        "user_id": 12345,
    },
    search_id="abcde12345",
)

Development

uv build
uv pip install -e .

Publish

uv publish

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For questions or suggestions, please open an issue or contact us at [email protected]

About

A simple and flexible Python logging utility with enhanced features for structured logging.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages