1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* e-debug-log.h: Ring buffer for logging debug messages 3 * 4 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 5 * 6 * This library is free software: you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published by 8 * the Free Software Foundation. 9 * 10 * This library is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 13 * for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this library. If not, see <http://www.gnu.org/licenses/>. 17 * 18 * Authors: Federico Mena-Quintero <federico@novell.com> 19 */ 20 21 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION) 22 #error "Only <libedataserver/libedataserver.h> should be included directly." 23 #endif 24 25 #ifndef E_DEBUG_LOG_H 26 #define E_DEBUG_LOG_H 27 28 #include <glib.h> 29 30 /** 31 * E_DEBUG_LOG_DOMAIN_USER: 32 * 33 * Since: 2.32 34 **/ 35 #define E_DEBUG_LOG_DOMAIN_USER "USER" /* always enabled */ 36 37 /** 38 * E_DEBUG_LOG_DOMAIN_GLOG: 39 * 40 * Since: 2.32 41 **/ 42 #define E_DEBUG_LOG_DOMAIN_GLOG "GLog" /* used for GLog messages; don't use it yourself */ 43 44 /** 45 * E_DEBUG_LOG_DOMAIN_CAL_QUERIES: 46 * 47 * Since: 2.32 48 **/ 49 #define E_DEBUG_LOG_DOMAIN_CAL_QUERIES "CalQueries" /* used for calendar queries analysis */ 50 51 G_BEGIN_DECLS 52 53 void e_debug_log (gboolean is_milestone, 54 const gchar *domain, 55 const gchar *format, 56 ...); 57 void e_debug_logv (gboolean is_milestone, 58 const gchar *domain, 59 const gchar *format, 60 va_list args); 61 gboolean e_debug_log_load_configuration (const gchar *filename, 62 GError **error); 63 void e_debug_log_enable_domains (const gchar **domains, 64 gint n_domains); 65 void e_debug_log_disable_domains (const gchar **domains, 66 gint n_domains); 67 gboolean e_debug_log_is_domain_enabled (const gchar *domain); 68 gboolean e_debug_log_dump (const gchar *filename, 69 GError **error); 70 gboolean e_debug_log_dump_to_dated_file (GError **error); 71 void e_debug_log_set_max_lines (gint num_lines); 72 gint e_debug_log_get_max_lines (void); 73 74 /* For testing only */ 75 void e_debug_log_clear (void); 76 77 G_END_DECLS 78 79 #endif /* E_DEBUG_LOG_H */ 80 81