mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Generate a seperate log message per dumped object for profiler.dump_log_objects (#90867)
Since some objects are very large we can generate overly large log messages ``` Event data for system_log_event exceed maximum size of 32768 bytes. This can cause database performance issues; Event data will not be stored ``` Reported in https://ptb.discord.com/channels/330944238910963714/427516175237382144/1093069996101472306
This commit is contained in:
parent
968a4e4818
commit
c663d8754b
@ -164,10 +164,11 @@ async def async_setup_entry( # noqa: C901
|
|||||||
|
|
||||||
obj_type = call.data[CONF_TYPE]
|
obj_type = call.data[CONF_TYPE]
|
||||||
|
|
||||||
|
for obj in objgraph.by_type(obj_type):
|
||||||
_LOGGER.critical(
|
_LOGGER.critical(
|
||||||
"%s objects in memory: %s",
|
"%s object in memory: %s",
|
||||||
obj_type,
|
obj_type,
|
||||||
[_safe_repr(obj) for obj in objgraph.by_type(obj_type)],
|
_safe_repr(obj),
|
||||||
)
|
)
|
||||||
|
|
||||||
persistent_notification.create(
|
persistent_notification.create(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user