mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 05:13:34 +08:00
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:
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* lib/stdio/lib_rawprintf.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
|
||||
@@ -83,7 +83,18 @@
|
||||
|
||||
int lib_rawvprintf(const char *fmt, va_list ap)
|
||||
{
|
||||
#if CONFIG_NFILE_DESCRIPTORS > 0
|
||||
#if defined(CONFIG_SYSLOG)
|
||||
|
||||
struct lib_outstream_s stream;
|
||||
|
||||
/* Wrap the low-level output in a stream object and let lib_vsprintf
|
||||
* do the work.
|
||||
*/
|
||||
|
||||
lib_syslogstream((FAR struct lib_outstream_s *)&stream);
|
||||
return lib_vsprintf((FAR struct lib_outstream_s *)&stream, fmt, ap);
|
||||
|
||||
#elif CONFIG_NFILE_DESCRIPTORS > 0
|
||||
|
||||
struct lib_rawoutstream_s rawoutstream;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user