Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Log.H

00001 /* $Id: Log.H,v 1.2 2000/11/03 22:03:28 rpav Exp $
00002  *
00003  * SFW - Studio FrameWork
00004  * Copyright (C) 2000  Ryan Pavlik
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program 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 this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019  *
00020  */
00021 
00022 #ifndef LOG_H
00023 #define LOG_H
00024 
00025 #include <SFW/Object.H>
00026 
00027 namespace SFW {
00028     enum LOG_LEVEL {
00029     L_FATAL,
00030     L_WARN,
00031     L_NORM,
00032     L_DBG0,
00033     L_DBG1,
00034     L_DBG2,
00035     L_DBG3,
00036     L_DBG4,
00037     L_DBG5
00038     };
00039     
00040     class Logger : public Object {
00041     LOG_LEVEL curLevel;
00042     
00043     public:
00044     TYPE_INFO(SFW::Logger, SFW::Object);
00045 
00046     Logger(LOG_LEVEL level = L_NORM);
00047 
00048     virtual void operator() (LOG_LEVEL level, char *fmt, ...);
00049     virtual void operator() (char *fmt, ...);
00050 
00051     void setLevel(LOG_LEVEL level);
00052     };
00053 
00054     extern Logger Log;
00055 }
00056 #endif /* LOG_H */

Generated at Tue Jan 2 15:38:34 2001 for SFW by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000