3
** Login : <ctaf42@gmail.Com>
4
** Started on Sat Feb 9 16:11:48 2008 Cedric GESTES
10
** Copyright (C) 2008 Cedric GESTES
11
** This program is free software; you can redistribute it and/or modify
12
** it under the terms of the GNU General Public License as published by
13
** the Free Software Foundation; either version 3 of the License, or
14
** (at your option) any later version.
16
** This program is distributed in the hope that it will be useful,
17
** but WITHOUT ANY WARRANTY; without even the implied warranty of
18
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
** GNU General Public License for more details.
21
** You should have received a copy of the GNU General Public License
22
** along with this program; if not, write to the Free Software
23
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
#ifndef CAIRO_DOCK_LOG_H_
27
# define CAIRO_DOCK_LOG_H_
35
void cd_log_location(const GLogLevelFlags loglevel,
43
* Initialize the log system.
45
void cd_log_init(gboolean bBlackTerminal);
48
* Set the verbosity level.
50
void cd_log_set_level(GLogLevelFlags loglevel);
53
* Set the verbosity level from a readable verbosity.
55
void cd_log_set_level_from_name (const gchar *cVerbosity);
58
/* Write an error message on the terminal. Error messages are used to indicate the cause of the program stop.
59
*@param ... the message format and parameters, in a 'printf' style.
61
#define cd_error(...) \
62
cd_log_location(G_LOG_LEVEL_ERROR, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
64
/* Write a critical message on the terminal. Critical messages should be as clear as possible to be useful for end-users.
65
*@param ... the message format and parameters, in a 'printf' style.
67
#define cd_critical(...) \
68
cd_log_location(G_LOG_LEVEL_CRITICAL, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
70
/* Write a warning message on the terminal. Warnings should be as clear as possible to be useful for end-users.
71
*@param ... the message format and parameters, in a 'printf' style.
73
#define cd_warning(...) \
74
cd_log_location(G_LOG_LEVEL_WARNING, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
76
/* Write a message on the terminal. Messages are used to trace the sequence of functions, and may be used by users for a quick debug.
77
*@param ... the message format and parameters, in a 'printf' style.
79
#define cd_message(...) \
80
cd_log_location(G_LOG_LEVEL_MESSAGE, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
82
/* Write a debug message on the terminal. Debug message are only useful for developpers.
83
*@param ... the message format and parameters, in a 'printf' style.
85
#define cd_debug(...) \
86
cd_log_location(G_LOG_LEVEL_DEBUG, __FILE__, __PRETTY_FUNCTION__, __LINE__,__VA_ARGS__)
89
#endif /* !CAIRO_DOCK_LOG_H_ */