summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-10-24 22:06:36 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-10-24 22:06:36 +0000
commitfb709522283bfb7558bf2b824a4143a919d59e97 (patch)
tree70b1c52bcd1c3e6aaa89e322674b5afe2b780467 /firmware/export
parent4c22f0bf73ce06b4c82cc92d636067aacf061d72 (diff)
downloadrockbox-fb709522283bfb7558bf2b824a4143a919d59e97.tar.gz
rockbox-fb709522283bfb7558bf2b824a4143a919d59e97.zip
logf changes:
* Disable logf by default and allow per-file enabling with "#define LOGF_ENABLE". To enable globally add that define in the config.h file. * Transform logf calls into DEBUGF calls when ROCKBOX_HAS_LOGF isn't defined, so that they get printed to the console in the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15291 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/logf.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/firmware/export/logf.h b/firmware/export/logf.h
index 868e8fc723..b706f3a4b0 100644
--- a/firmware/export/logf.h
+++ b/firmware/export/logf.h
@@ -21,6 +21,7 @@
21#include <config.h> 21#include <config.h>
22#include <stdbool.h> 22#include <stdbool.h>
23#include "../include/_ansi.h" 23#include "../include/_ansi.h"
24#include "debug.h"
24 25
25#ifdef ROCKBOX_HAS_LOGF 26#ifdef ROCKBOX_HAS_LOGF
26 27
@@ -38,8 +39,16 @@ extern bool logfwrap;
38void _logf(const char *format, ...) ATTRIBUTE_PRINTF(1, 2); 39void _logf(const char *format, ...) ATTRIBUTE_PRINTF(1, 2);
39 40
40#else /* !ROCKBOX_HAS_LOGF */ 41#else /* !ROCKBOX_HAS_LOGF */
41/* built without logf() support enabled */ 42
42#define logf(...) 43/* built without logf() support enabled, replace logf() by DEBUGF() */
44#define logf(f,args...) DEBUGF(f"\n",##args)
45
43#endif /* !ROCKBOX_HAS_LOGF */ 46#endif /* !ROCKBOX_HAS_LOGF */
44 47
45#endif /* LOGF_H */ 48#endif /* LOGF_H */
49
50/* Allow fine tuning (per file) of the logf output */
51#ifndef LOGF_ENABLE
52#undef logf
53#define logf(...)
54#endif