Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: New rockbox logging system

New rockbox logging system

From: Mike Giacomelli <giac2000_at_hotmail.com>
Date: Thu, 5 Jul 2012 18:30:13 -0400

Hi Everyone.

I've implemented a new logging system for rockbox to eventually
replace DEBUGF and LOGF. The new system is very similar to the old,
but with 2 significant improvements:

1) It uses the register_storage_idle_func to write log files to disk
during spin up. This is similar to how config files and battery bench
logs are handled. Thus, there is no loss of battery life from
logging.

2) There is a priority system for logging, such that the amount of
data logged is configurable. In addition, each entry to the log is
prepended with the function name that called it (and hopefully the
source file name once we have the makefile issues worked out). By
default, the preprocessor eliminates all non-error messages.

With these improvements, I plan to change the logging system to record
critical errors by default on both dev and release builds. This will
greatly simplify trouble shooting, particularly for users who often
have no way to figure out why Rockbox refuses to read a file, crashes
when building a database, etc. It will hopefully aid us in tracking
down rare crashes, particularly in places like codecs, bufflib, and
theme parsing by allowing users provide debug information directly.

I would appreciate it if people would take a look and provide feedback:

http://gerrit.rockbox.org/r/#/c/288/

Once this is committed, I will probably redefine all DEBUGF and LOGF
statements to the new system with a 'warning' priority so that they do
not get logged by default. It will then be up to developers going
forward to decide which conditions are critical enough to warrant
logging to disk.
Received on 2012-07-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy