log.h

00001 /*   
00002  *   (c) Copyright 2008 Philipp Skadorov (philipp_s@users.sourceforge.net)
00003  *
00004  *   This file is part of FREESECS.
00005  *
00006  *   FREESECS is free software: you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation, either version 3 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   FREESECS is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with FREESECS, see COPYING.
00018  *   If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 #ifndef _LOG_H
00021 #define _LOG_H
00022 
00033 #ifndef LOG_LEVEL_UPPER_BOUND
00034 #define LOG_LEVEL_UPPER_BOUND 0
00035 #endif 
00036 #ifndef LOG_LEVEL_LOWER_BOUND
00037 #define LOG_LEVEL_LOWER_BOUND 0
00038 #endif 
00039 
00040 #define LOG_TO_CONSOLE
00041 
00042 #ifndef LOG_FACILITY
00043 #define LOG_FACILITY LOG_LOCAL7
00044 #endif //ifndef LOG_FACILITY
00045 
00046 namespace freesecs
00047 {
00048     void TRACE_CRITICAL      (const char *fmt, ...);
00049     void TRACE_ERROR         (const char *fmt, ...);
00050     void TRACE_INFO          (int lvl, const char *fmt, ...);
00051     void TRACE_DEBUG         (int lvl, const char *fmt, ...);
00052 
00053     void TRACE_FSM_BEGIN     (int lvl, const char *fsm_name, int state, int event);
00054     void TRACE_FSM_END       (int lvl, const char *fsm_name, int state, int event);
00055     void TRACE_FSM_TRANS     (int lvl, const char *fsm_name, int prev_state, int new_state);
00056     void TRACE_FSM_ERROR     (int lvl, const char *fsm_name, const char *fmt, ...);
00057     void TRACE_FSM_ACTION    (int lvl, const char *fsm_name, const char *act, const char *fmt, ...);
00058     void TRACE_HEX_DUMP      (int lvl, const char *msg, size_t len);
00059 }//namespace
00060 #endif /* LOG__H */

Generated on Fri Oct 3 15:30:01 2008 for FREESECS hsms by  doxygen 1.5.1