querysets
log_panel.querysets
¶
LogQueryset(backend, filters=None)
¶
Chainable log filter accumulator evaluated against the active backend.
Source code in log_panel/querysets.py
filter(*, logger_names=None, min_level=None, search=None, timestamp_from=None, timestamp_to=None)
¶
Further filter the logs by logger name, minimum level, message content, or timestamp range.
Source code in log_panel/querysets.py
LogQuerySet
¶
Bases: QuerySet
Aggregation helpers for log analytics.
count_threshold_matches(*, logger_name, levels, window_start, window_end)
¶
Count matching records for one logger inside an inclusive time window.
Source code in log_panel/querysets.py
with_total()
¶
with_total_errors()
¶
Annotate the all-time count of ERROR and CRITICAL entries per group.
with_total_warnings()
¶
Annotate the all-time count of WARNING entries per group.
with_recent_errors(*, one_hour_ago)
¶
Annotate the count of ERROR/CRITICAL entries emitted since one_hour_ago.
Source code in log_panel/querysets.py
with_recent_warnings(*, one_hour_ago)
¶
Annotate the count of WARNING entries emitted since one_hour_ago.
Source code in log_panel/querysets.py
with_last_seen()
¶
cards_aggregation(*, one_hour_ago)
¶
Return per-logger totals and recent error/warning counts.
Chains all card annotation methods in order and groups by
logger_name, sorted by most recently seen first.
Source code in log_panel/querysets.py
with_has_error()
¶
Annotate whether any ERROR or CRITICAL entry exists in the group (non-zero = true).
with_has_warning()
¶
Annotate whether any WARNING entry exists in the group (non-zero = true).
timeline_aggregation(*, cutoff, range_config, app_timezone)
¶
Return error/warning presence per logger per time bucket.
Filters entries at or after cutoff, truncates timestamps to hour or
day boundaries in app_timezone, groups by logger_name and
bucket, then chains with_has_error and with_has_warning.
Source code in log_panel/querysets.py
levels_at_or_above(min_level)
¶
Return all LogLevel values at or above min_level by numeric severity.