django_logutils package

Submodules

django_logutils.middleware module

django_logutils.models module

django_logutils.utils module

Various utility functions.

class django_logutils.utils.EventLogger(logger_name=None, *args, **kwargs)[source]

Bases: object

EventLogger class that wrap the log_event function by optionally using an existing logger.

Usage: >>> log_event = EventLogger(‘my_logger’) >>> log_event(‘my_event’, {‘action’: ‘push_button’})

django_logutils.utils.add_items_to_message(msg, log_dict)[source]

Utility function to add dictionary items to a log message.

django_logutils.utils.log_event(event, logger=<logging.RootLogger object>, **log_dict)[source]

Utility function for logging an event (e.g. for metric analysis).

If no logger is given, fallback to the root logger.

Module contents

Package for django_logutils`.