/opt/cairo-dock/trunk/cairo-dock/src/cairo-dock-log.h

Aller à la documentation de ce fichier.
00001 /*
00002 ** cairo-dock-log.h
00003 ** Login : <ctaf42@gmail.Com>
00004 ** Started on  Sat Feb  9 16:11:48 2008 Cedric GESTES
00005 ** $Id$
00006 **
00007 ** Author(s)
00008 **  - Cedric GESTES
00009 **
00010 ** Copyright (C) 2008 Cedric GESTES
00011 ** This program is free software; you can redistribute it and/or modify
00012 ** it under the terms of the GNU General Public License as published by
00013 ** the Free Software Foundation; either version 3 of the License, or
00014 ** (at your option) any later version.
00015 **
00016 ** This program is distributed in the hope that it will be useful,
00017 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 ** GNU General Public License for more details.
00020 **
00021 ** You should have received a copy of the GNU General Public License
00022 ** along with this program; if not, write to the Free Software
00023 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00024 */
00025 
00026 #ifndef         CAIRO_DOCK_LOG_H_
00027 # define        CAIRO_DOCK_LOG_H_
00028 
00029 # include <gtk/gtk.h>
00030 
00031 # ifndef _INSIDE_CAIRO_DOCK_LOG_C_
00032   extern GLogLevelFlags gLogLevel;
00033 # endif
00034 
00035 /*
00036  * internal function
00037  */
00038 void cd_log_location(const GLogLevelFlags loglevel,
00039                      const char *file,
00040                      const char *func,
00041                      const int line,
00042                      const char *format,
00043                      ...);
00044 
00048 void cd_log_init(gboolean bBlackTerminal);
00049 
00053 void cd_log_set_level(GLogLevelFlags loglevel);
00054 
00055 #define cd_error(...)                                                  \
00056   cd_log_location(G_LOG_LEVEL_ERROR, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
00057 
00058 #define cd_critical(...)                                               \
00059   cd_log_location(G_LOG_LEVEL_CRITICAL, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
00060 
00061 #define cd_warning(...)                                                \
00062   cd_log_location(G_LOG_LEVEL_WARNING, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
00063 
00064 #define cd_message(...)                                                \
00065   cd_log_location(G_LOG_LEVEL_MESSAGE, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
00066 
00067 #define cd_debug(...)                                                  \
00068   cd_log_location(G_LOG_LEVEL_DEBUG, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
00069 
00070 #endif      /* !CAIRO_DOCK_LOG_H_ */

Généré le Wed Apr 16 03:27:15 2008 pour Cairo-Dock par  doxygen 1.5.3