orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
syslogger.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp 00005 * 00006 * This distribution is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef HYDROICEUTIL_SYSLOGGER_H 00012 #define HYDROICEUTIL_SYSLOGGER_H 00013 00014 #include <string> 00015 00016 namespace hydroiceutil { 00017 00018 namespace detail { 00019 00020 // 00021 // Logs things to syslog under UNIX, or the Event Log under Windows. 00022 // Currently, only the UNIX side is implemented. 00023 // 00024 // Not intended for use directly by libOrcaIce users, but rather internally in libOrcaIce. 00025 // 00026 // @author Alex Brooks 00027 // 00028 class SysLogger 00029 { 00030 00031 public: 00032 00033 SysLogger( const std::string &compName, bool isApp ); 00034 ~SysLogger(); 00035 00036 void logDebug( const std::string &msg ); 00037 void logInfo( const std::string &msg ); 00038 void logNotice( const std::string &msg ); 00039 void logWarning( const std::string &msg ); 00040 void logError( const std::string &msg ); 00041 00042 private: 00043 00044 void log( int priority, 00045 const std::string &priorityString, 00046 const std::string &msg ); 00047 00048 const std::string compName_; 00049 const bool isApp_; 00050 }; 00051 00052 } // namespace 00053 } // namespace 00054 00055 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)