From d46b090771291c10127d0fb421ee3c9f1e8f69b1 Mon Sep 17 00:00:00 2001 From: Michael Giacomelli Date: Tue, 3 Jul 2012 21:45:29 -0400 Subject: Introduce logging to disk feature into rockbox. Logs information, errors, etc to disk using the register_storage_idle_func mechanism to write to the disk when available. Currently, this is disabled in normal builds, but can be enabled by adding ROCKBOX_HAS_LOGDISKF to the config file. By default, it uses a 2KB buffer and drops text if the buffer overflows. The system includes a simple warning level mechanism that can be used to by default exclude non-serious errors from logging on release builds. Change-Id: I0a3d186a93625c7c93dae37b993a0d37e5a3a925 Reviewed-on: http://gerrit.rockbox.org/288 Reviewed-by: Jonathan Gordon Tested-by: Michael Giacomelli Reviewed-by: Michael Giacomelli --- apps/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps') diff --git a/apps/main.c b/apps/main.c index 4ce7249..6b6566c 100644 --- a/apps/main.c +++ b/apps/main.c @@ -76,6 +76,7 @@ #include "skin_engine/skin_engine.h" #include "statusbar-skinned.h" #include "bootchart.h" +#include "logdiskf.h" #if (CONFIG_PLATFORM & PLATFORM_ANDROID) #include "notification.h" #endif @@ -489,6 +490,10 @@ static void init(void) #endif #endif +#ifdef ROCKBOX_HAS_LOGDISKF + init_logdiskf(); +#endif + #if CONFIG_RTC rtc_init(); #endif -- cgit v1.1