Classes | |
| class | DedupStore |
| class | LogEntry |
| class | LogErrorHandler |
Functions | |
| tuple[str, int] | _figure_out_source (logging.LogRecord record, re.Pattern[str] paths_re, list[tuple[FrameType, int]]|None extracted_tb=None) |
| str | _safe_get_message (logging.LogRecord record) |
| bool | async_setup (HomeAssistant hass, ConfigType config) |
| None | list_errors (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg) |
Variables | |
| string | CONF_FIRE_EVENT = "fire_event" |
| string | CONF_LEVEL = "level" |
| string | CONF_LOGGER = "logger" |
| string | CONF_MAX_ENTRIES = "max_entries" |
| string | CONF_MESSAGE = "message" |
| CONFIG_SCHEMA | |
| string | DATA_SYSTEM_LOG = "system_log" |
| bool | DEFAULT_FIRE_EVENT = False |
| int | DEFAULT_MAX_ENTRIES = 50 |
| string | DOMAIN = "system_log" |
| string | EVENT_SYSTEM_LOG = "system_log_event" |
| KeyType | |
| string | SERVICE_CLEAR = "clear" |
| SERVICE_CLEAR_SCHEMA = vol.Schema({}) | |
| string | SERVICE_WRITE = "write" |
| SERVICE_WRITE_SCHEMA | |
Support for system log.
|
private |
Figure out where a log message came from.
Definition at line 66 of file __init__.py.
|
private |
Get message from record and handle exceptions. This code will be unreachable during a pytest run because pytest installs a logging handler that will prevent this code from being reached. Calling record.getMessage() can raise an exception if the log message does not contain sufficient arguments. As there is no guarantees about which exceptions that can be raised, we catch all exceptions and return a generic message. This must be manually tested when changing the code.
Definition at line 137 of file __init__.py.
| bool homeassistant.components.system_log.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Set up the logger component.
Definition at line 295 of file __init__.py.
| None homeassistant.components.system_log.list_errors | ( | HomeAssistant | hass, |
| websocket_api.ActiveConnection | connection, | ||
| dict[str, Any] | msg | ||
| ) |
List all possible diagnostic handlers.
Definition at line 346 of file __init__.py.
| string homeassistant.components.system_log.CONF_FIRE_EVENT = "fire_event" |
Definition at line 25 of file __init__.py.
| string homeassistant.components.system_log.CONF_LEVEL = "level" |
Definition at line 27 of file __init__.py.
| string homeassistant.components.system_log.CONF_LOGGER = "logger" |
Definition at line 28 of file __init__.py.
| string homeassistant.components.system_log.CONF_MAX_ENTRIES = "max_entries" |
Definition at line 24 of file __init__.py.
| string homeassistant.components.system_log.CONF_MESSAGE = "message" |
Definition at line 26 of file __init__.py.
| homeassistant.components.system_log.CONFIG_SCHEMA |
Definition at line 40 of file __init__.py.
| string homeassistant.components.system_log.DATA_SYSTEM_LOG = "system_log" |
Definition at line 30 of file __init__.py.
| bool homeassistant.components.system_log.DEFAULT_FIRE_EVENT = False |
Definition at line 32 of file __init__.py.
| int homeassistant.components.system_log.DEFAULT_MAX_ENTRIES = 50 |
Definition at line 31 of file __init__.py.
| string homeassistant.components.system_log.DOMAIN = "system_log" |
Definition at line 33 of file __init__.py.
| string homeassistant.components.system_log.EVENT_SYSTEM_LOG = "system_log_event" |
Definition at line 35 of file __init__.py.
| homeassistant.components.system_log.KeyType |
Definition at line 22 of file __init__.py.
| string homeassistant.components.system_log.SERVICE_CLEAR = "clear" |
Definition at line 37 of file __init__.py.
| homeassistant.components.system_log.SERVICE_CLEAR_SCHEMA = vol.Schema({}) |
Definition at line 54 of file __init__.py.
| string homeassistant.components.system_log.SERVICE_WRITE = "write" |
Definition at line 38 of file __init__.py.
| homeassistant.components.system_log.SERVICE_WRITE_SCHEMA |
Definition at line 55 of file __init__.py.