Add logic to re-direct debug output to a sysloggin device

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4381 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-02-11 14:20:40 +00:00
parent f03655f43a
commit bdbe8e114c
30 changed files with 541 additions and 117 deletions
+9 -7
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* lib/stdio/lib_lowprintf.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -82,17 +82,19 @@
* Name: lib_lowvprintf
****************************************************************************/
#ifdef CONFIG_ARCH_LOWPUTC
#if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_SYSLOG)
int lib_lowvprintf(const char *fmt, va_list ap)
{
struct lib_outstream_s stream;
/* Wrap the stdout in a stream object and let lib_vsprintf
* do the work.
*/
/* Wrap the stdout in a stream object and let lib_vsprintf do the work. */
#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
lib_syslogstream((FAR struct lib_outstream_s *)&stream);
#else
lib_lowoutstream((FAR struct lib_outstream_s *)&stream);
#endif
return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap);
}
@@ -111,4 +113,4 @@ int lib_lowprintf(const char *fmt, ...)
return ret;
}
#endif /* CONFIG_ARCH_LOWPUTC */
#endif /* CONFIG_ARCH_LOWPUTC || CONFIG_SYSLOG*/