summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2012-07-03 21:45:29 -0400
committerMichael Giacomelli <mgiacomelli@gmail.com>2012-08-07 00:53:46 +0200
commitd46b090771291c10127d0fb421ee3c9f1e8f69b1 (patch)
treeae5a6e01f6d2025294f8905a9a791c4ede3d4869 /apps/main.c
parent7c31ff2fb0cc3ba40f82c3b02daf1e7ca41e1cf6 (diff)
downloadrockbox-d46b090771291c10127d0fb421ee3c9f1e8f69b1.tar.gz
rockbox-d46b090771291c10127d0fb421ee3c9f1e8f69b1.zip
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 <rockbox@jdgordon.info> Tested-by: Michael Giacomelli <mgiacomelli@gmail.com> Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/main.c b/apps/main.c
index 4ce72497d7..6b6566c7ca 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -76,6 +76,7 @@
76#include "skin_engine/skin_engine.h" 76#include "skin_engine/skin_engine.h"
77#include "statusbar-skinned.h" 77#include "statusbar-skinned.h"
78#include "bootchart.h" 78#include "bootchart.h"
79#include "logdiskf.h"
79#if (CONFIG_PLATFORM & PLATFORM_ANDROID) 80#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
80#include "notification.h" 81#include "notification.h"
81#endif 82#endif
@@ -489,6 +490,10 @@ static void init(void)
489#endif 490#endif
490#endif 491#endif
491 492
493#ifdef ROCKBOX_HAS_LOGDISKF
494 init_logdiskf();
495#endif
496
492#if CONFIG_RTC 497#if CONFIG_RTC
493 rtc_init(); 498 rtc_init();
494#endif 499#endif