I started out with the premise that manual logging is very hard to do well. It takes effort on my part (and thus hinges on my discipline), can be inconsistent, and can change depending on what my important metrics are.
I automatically collect as much information as possible. I log every time I change a window or tab and what I change it to (extending from native windows on macOS all the way through to virtual windows in gmail.com). I log the same from my iPhone. I throw all of my data in a Postgres data warehouse, and then use a BI tool to normalize it and put some KPIs in a dashboard.
This system allows me to ask anything from "what articles did I read last week?" to "what percentage of my time at work did I spend programming?" to "how much did I sleep this week?" to "who do I spend the most time messaging?".
It's also an exercise in understanding that metadata is incredibly revealing.