summaryrefslogtreecommitdiff
path: root/nuttx/include/debug.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-28 21:55:16 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-28 21:55:16 +0000
commitae5e2d8004affd8a0519de97a3c1ad700fa2b720 (patch)
treed6bc886b1d8c6772e245e715bb2676d95b8a9b78 /nuttx/include/debug.h
parent489c78d7b6b14ca5b8eb7e2011c77599166a7894 (diff)
downloadnuttx-ae5e2d8004affd8a0519de97a3c1ad700fa2b720.tar.gz
nuttx-ae5e2d8004affd8a0519de97a3c1ad700fa2b720.tar.bz2
nuttx-ae5e2d8004affd8a0519de97a3c1ad700fa2b720.zip
Add syslog.h; rename lib_rawprintf() to syslog()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5578 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/debug.h')
-rw-r--r--nuttx/include/debug.h37
1 files changed, 12 insertions, 25 deletions
diff --git a/nuttx/include/debug.h b/nuttx/include/debug.h
index aa5efd432..70ae2ee18 100644
--- a/nuttx/include/debug.h
+++ b/nuttx/include/debug.h
@@ -1,7 +1,7 @@
/****************************************************************************
* include/debug.h
*
- * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
#include <nuttx/config.h>
#include <nuttx/compiler.h>
-#include <stdint.h>
+#include <syslog.h>
/****************************************************************************
* Pre-processor Definitions
@@ -104,22 +104,22 @@
#ifdef CONFIG_DEBUG
# define dbg(format, arg...) \
- lib_rawprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
+ syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
# ifdef CONFIG_ARCH_LOWPUTC
# define lldbg(format, arg...) \
- lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
+ lowsyslog(EXTRA_FMT format EXTRA_ARG, ##arg)
# else
# define lldbg(x...)
# endif
# ifdef CONFIG_DEBUG_VERBOSE
# define vdbg(format, arg...) \
- lib_rawprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
+ syslog(EXTRA_FMT format EXTRA_ARG, ##arg)
# ifdef CONFIG_ARCH_LOWPUTC
# define llvdbg(format, arg...) \
- lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
+ lowsyslog(EXTRA_FMT format EXTRA_ARG, ##arg)
# else
# define llvdbg(x...)
# endif
@@ -576,29 +576,16 @@ extern "C"
{
#endif
-/* These low-level debug APIs are provided by the NuttX library. If the
- * cross-compiler's pre-processor supports a variable number of macro
- * arguments, then the macros below will map all debug statements to one
- * or the other of the following.
- */
-
-int lib_rawprintf(FAR const char *format, ...);
-
-#ifdef CONFIG_ARCH_LOWPUTC
-int lib_lowprintf(FAR const char *format, ...);
-#endif
-
/* Dump a buffer of data */
void lib_dumpbuffer(FAR const char *msg, FAR const uint8_t *buffer, unsigned int buflen);
-/* Enable or disable debug output */
-
-#ifdef CONFIG_DEBUG_ENABLE
-void dbg_enable(bool enable);
-#endif
-
-/* If the cross-compiler's pre-processor does not support variable length
+/* The system logging interfaces are pnormally accessed via the macros
+ * provided above. If the cross-compiler's C pre-processor supports a
+ * variable number of macro arguments, then those macros below will map all
+ * debug statements to the logging interfaces declared in syslog.h.
+ *
+ * If the cross-compiler's pre-processor does not support variable length
* arguments, then these additional APIs will be built.
*/