2
log.h - definitions of logging funtions
4
Copyright (C) 2002, 2003, 2007, 2008 Arthur de Jong
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
28
#include "compat/attrs.h"
31
/* set loglevel when no logging is configured */
32
void log_setdefaultloglevel(int loglevel);
35
/* configure logging to a file */
36
void log_addlogging_file(const char *filename,int loglevel);
39
/* configure logging to syslog */
40
void log_addlogging_syslog(int loglevel);
43
/* configure a null logging mode (no logging) */
44
void log_addlogging_none(void);
47
/* start the logging with the configured logging methods
48
if no method is configured yet, logging is done to syslog */
49
void log_startlogging(void);
52
/* indicate that a session id should be included in the output
53
and set it to a new value */
54
void log_newsession(void);
57
/* log the given message using the configured logging method */
58
void log_log(int pri,const char *format, ...)
62
/* return the syslog loglevel represented by the string
63
return -1 on unknown */
64
int log_getloglevel(const char *lvl)
68
#endif /* not _LOG_H */