conf
log_panel.conf
¶
reset_backend_cache()
¶
get_user_config()
¶
get_setting(key)
¶
Return a value from LOG_PANEL in Django settings, falling back to DEFAULTS.
get_thresholds()
¶
Return per-level alert thresholds, merging user config with defaults.
Source code in log_panel/conf.py
get_ignored_logger_prefixes()
¶
Return namespace logger prefixes skipped by the database handler.
Source code in log_panel/conf.py
get_ignored_logger_names()
¶
get_ignored_message_substrings()
¶
get_ranges()
¶
Return timeline range settings normalised into typed configs.
Source code in log_panel/conf.py
get_database_alias()
¶
get_backend()
¶
Instantiate and return the configured backend, or None if not configured.
The result is cached for the lifetime of the process so that the underlying connection pool is reused across requests.
Resolution order: 1. LOG_PANEL['BACKEND'] dotted class path (explicit override). 2. OrmBackend if LOG_PANEL['DATABASE_ALIAS'] is set. 3. None — admin will show an unconfigured state.
Returns:
| Type | Description |
|---|---|
|
A LogsBackend instance, or None. |
Source code in log_panel/conf.py
get_buffer_size()
¶
get_buffer_flush_interval()
¶
get_buffer_flush_level()
¶
get_level_colors()
¶
Return the level color map used for both CSS generation and the filter dropdown.
Merges user-configured LOG_PANEL['LEVEL_COLORS'] with defaults, so only
overridden or added levels need to be specified.
Source code in log_panel/conf.py
get_permission_callback()
¶
Return the configured permission callable, or None.
The setting must be a dotted path to a callable (request: HttpRequest) -> bool.
When not configured, the panel falls back to allowing any active staff user.
Raises:
| Type | Description |
|---|---|
ImproperlyConfigured
|
if the dotted path is set but cannot be imported. |