2008-05-05 Paolo Borelli <pborelli@katamail.com>
[nautilus.git] / libnautilus-private / nautilus-debug-log.h
blob801610d5050e7cf9b255cb34a868a15cde312c5a
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
3 nautilus-debug-log.h: Ring buffer for logging debug messages
5 Copyright (C) 2006 Novell, Inc.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public
18 License along with this program; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
22 Author: Federico Mena-Quintero <federico@novell.com>
25 #ifndef NAUTILUS_DEBUG_LOG_H
26 #define NAUTILUS_DEBUG_LOG_H
28 #include <glib.h>
30 #define NAUTILUS_DEBUG_LOG_DOMAIN_USER "USER" /* always enabled */
31 #define NAUTILUS_DEBUG_LOG_DOMAIN_ASYNC "async" /* when asynchronous notifications come in */
32 #define NAUTILUS_DEBUG_LOG_DOMAIN_GLOG "GLog" /* used for GLog messages; don't use it yourself */
34 void nautilus_debug_log (gboolean is_milestone, const char *domain, const char *format, ...);
36 void nautilus_debug_log_with_uri_list (gboolean is_milestone, const char *domain, const GList *uris,
37 const char *format, ...);
38 void nautilus_debug_log_with_file_list (gboolean is_milestone, const char *domain, GList *files,
39 const char *format, ...);
41 void nautilus_debug_logv (gboolean is_milestone, const char *domain, const GList *uris, const char *format, va_list args);
43 gboolean nautilus_debug_log_load_configuration (const char *filename, GError **error);
45 void nautilus_debug_log_enable_domains (const char **domains, int n_domains);
46 void nautilus_debug_log_disable_domains (const char **domains, int n_domains);
48 gboolean nautilus_debug_log_is_domain_enabled (const char *domain);
50 gboolean nautilus_debug_log_dump (const char *filename, GError **error);
52 void nautilus_debug_log_set_max_lines (int num_lines);
53 int nautilus_debug_log_get_max_lines (void);
55 /* For testing only */
56 void nautilus_debug_log_clear (void);
58 #endif /* NAUTILUS_DEBUG_LOG_H */