managers
log_panel.managers
¶
LogReader
¶
Read-only interface for querying logs outside the admin panel.
Use in your own views, APIs, or background tasks. Subclass and
override :meth:get_queryset to apply default filters (e.g. logger
name or minimum level restrictions) for a specific user role.
Further filters can still be chained on the returned LogQueryset.
get_queryset()
¶
Returns a LogQueryset for the active backend with no filters applied.
LogRecordManager
¶
Bases: Manager
Custom manager for Log
count_threshold_matches(*, logger_name, levels, window_start, window_end)
¶
Count how many log records match the given logger name and level filters within the specified time window.
Source code in log_panel/managers.py
create_from_record(timestamp, level, logger_name, message, module, pathname, line_number)
¶
Persist a single log record.
Source code in log_panel/managers.py
bulk_create_from_records(records)
¶
Persist multiple log records in a single bulk insert operation.