I really don’t know why I waited 8 years before adding a routine to clean up Carl’s (and Dave’s) life.log after a power fail / improper shutdown that writes a string of null chars in the log before the power is jerked.
BUT I FINALLY did it. So many times I would ask for Carl or Dave’s total life statistics and the statistics computation program would fail to calculate some values because somewhere in the 5000 lines of the log there were a bunch of null chars. For years, I have manually paged through their logs till I found the offensive chars and delete them.
FINALLY! added 10 lines to clean {Carl, Dave, WaLI, RPi5Desk} logs automatically of null chars.
# *********** RPi5Desk life.log *************
#
# ** First "life" 2025-10
# Catchup Life: 240 hrs estimate
#
Catchup|Catchup execution: 240.0
2025-10-30 02:00|------------ boot ------------
2025-10-30 02:40|lifelogger.dEmain execution: 0.6
2025-10-30 12:10|------------ boot ------------
2025-10-30 12:19|lifelogger.dEmain execution: 0.15
2025-10-30 12:19|[logMaintenance.py.main]** setup life.log **
2025-10-30 12:21|------------ boot ------------
2025-11-09 09:48|lifelogger.dEmain execution: 238.45
2025-11-09 09:50|[logMaintenance.py.main]** shutdown til needed **
^@^@^@^@^@^@^@^@^@^@^@^@^@2025-11-09 18:40|------------ boot ------------
2025-11-24 23:40|lifelogger.dEmain execution: 365.00
2025-11-24 23:43|------------ boot ------------
2026-01-09 20:31|lifelogger.dEmain execution: 1100.95
after cleanup:
# *********** RPi5Desk life.log *************
#
# ** First "life" 2025-10
# Catchup Life: 240 hrs estimate
#
Catchup|Catchup execution: 240.0
2025-10-30 02:00|------------ boot ------------
2025-10-30 02:40|lifelogger.dEmain execution: 0.6
2025-10-30 12:10|------------ boot ------------
2025-10-30 12:19|lifelogger.dEmain execution: 0.15
2025-10-30 12:19|[logMaintenance.py.main]** setup life.log **
2025-10-30 12:21|------------ boot ------------
2025-11-09 09:48|lifelogger.dEmain execution: 238.45
2025-11-09 09:50|[logMaintenance.py.main]** shutdown til needed **
2025-11-09 18:40|------------ boot ------------
2025-11-24 23:40|lifelogger.dEmain execution: 365.00
2025-11-24 23:43|------------ boot ------------
2026-01-09 20:40|lifelogger.dEmain execution: 1100.95