mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:53:33 +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 @@
|
||||
/****************************************************************************
|
||||
* up_initialize.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
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/fs.h>
|
||||
#include <nuttx/ramlog.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
|
||||
@@ -50,6 +51,12 @@
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Determine which device to use as the system loggin device */
|
||||
|
||||
#ifndef CONFIG_SYSLOG
|
||||
# undef CONFIG_RAMLOG_SYSLOG
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
@@ -99,6 +106,10 @@ void up_initialize(void)
|
||||
devzero_register(); /* Standard /dev/zero */
|
||||
up_devconsole(); /* Our private /dev/console */
|
||||
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
ramlog_sysloginit(); /* System logging device */
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user