Logo Tesseroids 1.0: User Manual and API Documentation

src/c/logger.h

Go to the documentation of this file.
00001 /* *****************************************************************************
00002 Copyright 2011 Leonardo Uieda
00003 
00004 Tesseroids is free software: you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation, either version 3 of the License, or
00007 (at your option) any later version.
00008 
00009 Tesseroids is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with Tesseroids.  If not, see <http://www.gnu.org/licenses/>.
00016 ***************************************************************************** */
00017 
00056 #ifndef _TESSEROIDS_LOGGER_H_
00057 #define _TESSEROIDS_LOGGER_H_
00058 
00059 /* Needed for definition of FILE */
00060 #include <stdio.h>
00061 
00062 
00064 #define LOG_DEBUG   0
00065 
00066 #define LOG_INFO    1
00067 
00068 #define LOG_WARNING 2
00069 
00070 #define LOG_ERROR   3
00071 
00072 
00074 typedef struct logger_struct
00075 {
00076     int level; 
00077     int filelogging; 
00078     int file_level; 
00079     FILE *logfile; 
00081 } LOGGER;
00082 
00083 
00085 extern LOGGER logger;
00086 
00087 
00096 extern void log_init(int level);
00097 
00098 
00108 extern void log_tofile(FILE *logfile, int level);
00109 
00110 
00117 extern void log_debug(const char *fmt, ...);
00118 
00119 
00128 extern void log_info(const char *fmt, ...);
00129 
00130 
00137 extern void log_warning(const char *fmt, ...);
00138 
00139 
00146 extern void log_error(const char *fmt, ...);
00147 
00148 
00149 #endif
Generated on Tue Apr 26 12:17:07 2011 for Tesseroids 1.0: User manual and API documentation by doxygen 1.6.3