log.h

00001 /*****************************************************************
00002  * gmerlin - a general purpose multimedia framework and applications
00003  *
00004  * Copyright (c) 2001 - 2008 Members of the Gmerlin project
00005  * gmerlin-general@lists.sourceforge.net
00006  * http://gmerlin.sourceforge.net
00007  *
00008  * This program is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020  * *****************************************************************/
00021 
00022 #ifndef __BG_LOG_H_
00023 #define __BG_LOG_H_
00024 
00025 /* Gmerlin log facilities */
00026 
00027 #include <gmerlin/parameter.h>
00028 #include <gmerlin/msgqueue.h>
00029 
00030 #include <libintl.h>
00031 
00051 typedef enum
00052   {
00053     BG_LOG_DEBUG    = 1<<0, 
00054     BG_LOG_WARNING  = 1<<1, 
00055     BG_LOG_ERROR    = 1<<2, 
00056     BG_LOG_INFO     = 1<<3  
00057   } bg_log_level_t;
00058 
00059 #define BG_LOG_LEVEL_MAX (1<<3)
00060 
00075 void bg_log_notranslate(bg_log_level_t level, const char * domain,
00076                         const char * format, ...) __attribute__ ((format (printf, 3, 4)));
00077 
00092 void bg_logs_notranslate(bg_log_level_t level, const char * domain,
00093                          const char * str);
00094 
00095 
00096 
00112 void bg_log_translate(const char * translation_domain,
00113                       bg_log_level_t level, const char * domain,
00114                       const char * format, ...) __attribute__ ((format (printf, 4, 5)));
00115 
00120 #define bg_log(level, domain, ...) \
00121     bg_log_translate(PACKAGE, level, domain, __VA_ARGS__)
00122 
00123 
00139 void bg_log_set_dest(bg_msg_queue_t * q);
00140 
00147 const char * bg_log_level_to_string(bg_log_level_t level);
00148 
00157 void bg_log_set_verbose(int mask);
00158 
00167 char * bg_log_last_error();
00168 
00169 #endif // __BG_LOG_H_

Generated on Mon Jun 15 12:25:51 2009 for gmerlin by  doxygen 1.5.9