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
397fbc0e41
commit
4c767b2f72
1 changed files with 6 additions and 5 deletions
|
@ -164,11 +164,12 @@ async def async_setup_entry( # noqa: C901
|
|||
|
||||
obj_type = call.data[CONF_TYPE]
|
||||
|
||||
_LOGGER.critical(
|
||||
"%s objects in memory: %s",
|
||||
obj_type,
|
||||
[_safe_repr(obj) for obj in objgraph.by_type(obj_type)],
|
||||
)
|
||||
for obj in objgraph.by_type(obj_type):
|
||||
_LOGGER.critical(
|
||||
"%s object in memory: %s",
|
||||
obj_type,
|
||||
_safe_repr(obj),
|
||||
)
|
||||
|
||||
persistent_notification.create(
|
||||
hass,
|
||||
|
|
Loading…
Add table
Reference in a new issue