Does anyone have any idea why a 2nd log file called home-assistant.log.1 is being created in the config folder? I never noticed it before.
Every time I delete it, it comes back. Annoying.
Does anyone have any idea why a 2nd log file called home-assistant.log.1 is being created in the config folder? I never noticed it before.
Every time I delete it, it comes back. Annoying.
As far as I know it has been introduced with the latest updateā¦ and the purpose is most likely to have the log (previous one) available also after restart. Before that the log was always deleted upon restart and if something went wrong you couldnāt figure out, what happened - now you can.
Great. Good to know. Thank you.
Where was that feature announced?
Afaik it was not and Iām also not sure, this is really why it exists - itās just my interpretation of whatās happening :).
Edit: I was right though - it was announced under āAll changesā when releasing 2021.9.0 - here.
I did not see any official statement in any blog post but :
Here is the PR
The famous All-changes-too-long-list
Thanks guys. Iām glad I asked. You were great help.
After 18 months of no log-related issues, I suddenly have a 20gb home-assistant.log.1 file.
Anyone else seeing this kind of issue?
I suddenly have the same problem.
At once.
No idea why.
Hello did you found any solution? I have the same issue since last updadte , My database is grwing from 1 GB to 60 in 2 days, and this did never happend beforeā¦
any help pleaseā¦
marc
Same here. My home-assistant.log.1 is already 72GB. Any solution to this?
That file gets re-created every time you restart HA. And it only gets the data that is contained in the home-assistant.log file at restart.
if the file that big now then that means the home-assistant.log file was also that big the last time you restarted HA.
So the solution to that big of a file is to look at the file contents and see why you are getting that many info/warning/errors to make your original log file that big in the first place.
Hello,
the size of the home-assistant.log file is determined by the āloggerā integration.
It says in the logs that the default logging level is āwarningā when nothing is present in the config, but if you put ālogger:ā and did not specify the level, it becomes debug.
It is a bit hidden but if you scroll down the logger integration documentation page it says so.
Excerpts from the docs:
The log severity level is
warning
if the logger integration is not enabled inconfiguration.yaml
.
But then below (emphasis is mine):
CONFIGURATION VARIABLES
Looking for your configuration file?
default string (optional, default: debug)
Default log level. See log_level.
So to solve this you need to put default: warning (or less) in the config, as such:
logger:
default: warning