Don’t feel bad. I’m still not sure on all the jargon. The “Recorder” is the process which saves data about changes to entities. For example, a light switch “state” changing from off to on, or an “event” indicating that an automation ran. These are saved for as long as you indicate in your configuration.yaml file:
recorder:
purge_keep_days: #
There are other tables in the same database which save long-term statistics. These are kept forever, but they are summarized each day (I think) or the database size would be unworkable. These tables don’t have any “purge” function or “keep days” option.
The logs, on the other hand, are just what they sound like. Text files to which sequential lines are written as things happen on the system. Errors, warnings, or other levels you can specify. These are used for debugging when there’s a problem. They can grow if you have a particularly “chatty” integration, but that problem doesn’t seem to come up here as much as a bloated database.
The core HA log is home-assistant.log, in the config folder. It gets created when HA starts, at which time the old log is re-named to home-assistant.log.1. It’s often that old log which is most helpful in debugging serious issues like HA crashing. But it doesn’t contain much about routine state changes and events going on when things are running normally.
Likewise, ESPHome devices will send you an ongoing log of what they’re doing, if you connect to them. I don’t think that’s saved anywhere. It will show you what kind of information it’s seeing, including whatever it’s sending to HA via the API. These may be stored in the HA database by the Recorder, providing they represent an event or state change, and the entity isn’t excluded in configuration.yaml.
If the entity changes a lot it can certainly bloat the database. Adding to this is the way Recorder not only saves the value which changed, but can also save a bunch of other “attributes” about the entity in each record, sometimes even those which haven’t changed. I think the thread about keeping the database size down has some SQL which would allow you to quantify which entities are the worst offenders in bloating the database. If not there are other threads here where it has been discussed.
I suspect any logon attempt failures will show up in one of the logs, not in the database.