• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/avahi-0.6.25/avahi-core/

Lines Matching defs:*

0 /* $Id$ */
4 This file is part of avahi.
6 avahi is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 2.1 of the
9 License, or (at your option) any later version.
11 avahi is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
14 Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with avahi; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 USA.
22 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
26 #include <stdio.h>
27 #include <stdarg.h>
29 #include "log.h"
31 static AvahiLogFunction log_function = NULL;
33 void avahi_set_log_function(AvahiLogFunction function) {
34 log_function = function;
37 void avahi_log_ap(AvahiLogLevel level, const char*format, va_list ap) {
38 char txt[256];
40 vsnprintf(txt, sizeof(txt), format, ap);
42 if (log_function)
43 log_function(level, txt);
44 else
45 fprintf(stderr, "%s\n", txt);
48 void avahi_log(AvahiLogLevel level, const char*format, ...) {
49 va_list ap;
50 va_start(ap, format);
51 avahi_log_ap(level, format, ap);
52 va_end(ap);
55 void avahi_log_error(const char*format, ...) {
56 va_list ap;
57 va_start(ap, format);
58 avahi_log_ap(AVAHI_LOG_ERROR, format, ap);
59 va_end(ap);
62 void avahi_log_warn(const char*format, ...) {
63 va_list ap;
64 va_start(ap, format);
65 avahi_log_ap(AVAHI_LOG_WARN, format, ap);
66 va_end(ap);
69 void avahi_log_notice(const char*format, ...) {
70 va_list ap;
71 va_start(ap, format);
72 avahi_log_ap(AVAHI_LOG_NOTICE, format, ap);
73 va_end(ap);
76 void avahi_log_info(const char*format, ...) {
77 va_list ap;
78 va_start(ap, format);
79 avahi_log_ap(AVAHI_LOG_INFO, format, ap);
80 va_end(ap);
83 void avahi_log_debug(const char*format, ...) {
84 va_list ap;
85 va_start(ap, format);
86 avahi_log_ap(AVAHI_LOG_DEBUG, format, ap);
87 va_end(ap);