1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
3
* Copyright (C) 2011 Red Hat, Inc.
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General
16
* Public License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18
* Boston, MA 02111-1307, USA.
20
* Author: David Zeuthen <davidz@redhat.com>
23
#if !defined (__GOA_BACKEND_INSIDE_GOA_BACKEND_H__) && !defined (GOA_BACKEND_COMPILATION)
24
#error "Only <goabackend/goabackend.h> can be included directly."
27
#ifndef __GOA_LOGGING_H__
28
#define __GOA_LOGGING_H__
32
#include "goabackendenums-priv.h"
36
void goa_log_init (gboolean no_colors);
38
void goa_log (GoaLogLevel level,
39
const gchar *function,
40
const gchar *location,
42
...) G_GNUC_PRINTF (4, 5);
46
* @...: printf()-style format string and arguments
48
* Logging macro for %GOA_LOG_LEVEL_DEBUG.
50
#define goa_debug(...) goa_log(GOA_LOG_LEVEL_DEBUG, G_STRFUNC, G_STRLOC, __VA_ARGS__);
54
* @...: printf()-style format string and arguments
56
* Logging macro for %GOA_LOG_LEVEL_INFO.
58
#define goa_info(...) goa_log(GOA_LOG_LEVEL_INFO, G_STRFUNC, G_STRLOC, __VA_ARGS__);
62
* @...: printf()-style format string and arguments
64
* Logging macro for %GOA_LOG_LEVEL_NOTICE.
66
#define goa_notice(...) goa_log(GOA_LOG_LEVEL_NOTICE, G_STRFUNC, G_STRLOC, __VA_ARGS__);
70
* @...: printf()-style format string and arguments
72
* Logging macro for %GOA_LOG_LEVEL_WARNING.
74
#define goa_warning(...) goa_log(GOA_LOG_LEVEL_WARNING, G_STRFUNC, G_STRLOC, __VA_ARGS__);
78
* @...: printf()-style format string and arguments
80
* Logging macro for %GOA_LOG_LEVEL_ERROR.
82
#define goa_error(...) goa_log(GOA_LOG_LEVEL_ERROR, G_STRFUNC, G_STRLOC, __VA_ARGS__);
87
#endif /* __GOA_LOGGING_H__ */