00001 /* 00002 ** This file is part of the C Utility Toolkit (CUTK) 00003 ** Copyright (C) 2002-2005 Chris Osgood 00004 ** http://www.cutk.org 00005 ** 00006 ** This library is free software; you can redistribute it and/or 00007 ** modify it under the terms of the GNU Lesser General Public 00008 ** License as published by the Free Software Foundation; either 00009 ** version 2.1 of the License, or (at your option) any later version. 00010 ** 00011 ** This library 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 GNU 00014 ** Lesser General Public License for more details. 00015 ** 00016 ** You should have received a copy of the GNU Lesser General Public 00017 ** License along with this library; if not, write to the Free Software 00018 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 ** 00020 ** Please report all bugs and problems to "bugs at cutk.org". 00021 */ 00022 00023 /* 00024 ** $Id: log.h 8 2005-01-02 16:25:13Z chris $ 00025 */ 00026 00027 #ifndef __INCLUDE_LOG_H__ 00028 #define __INCLUDE_LOG_H__ 00029 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif 00033 00034 void flogf_disable(void); 00035 void flogf_enable(void); 00036 void flogf_disableTime(void); 00037 void flogf_enableTime(void); 00038 void flogf_filename(const char* filename); 00039 void flogf(const char* msg0, ...); 00040 00041 /* 00042 ** The following creates a marker in the log file. It logs the function name, 00043 ** file name, and line number at the mark point. 00044 */ 00045 #define LOG_MARK flogf("%s (%s:%u)",__FUNCTION__,__FILE__,__LINE__) 00046 00047 #ifdef __cplusplus 00048 } 00049 #endif 00050 00051 #endif /* __INCLUDE_LOG_H__ */