]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/radiusclient/lib/log.c
Whitespace tidying.
[ppp.git] / pppd / plugins / radius / radiusclient / lib / log.c
1 /*
2  * $Id: log.c,v 1.2 2002/02/27 15:51:20 dfs Exp $
3  *
4  * Copyright (C) 1995,1996,1997 Lars Fenneberg
5  *
6  * See the file COPYRIGHT for the respective terms and conditions.
7  * If the file is missing contact me at lf@elemental.net
8  * and I'll send you a copy.
9  *
10  */
11
12 #include <config.h>
13 #include <includes.h>
14 #include <radiusclient.h>
15
16 /*
17  * Function: rc_openlog
18  *
19  * Purpose: open log
20  *
21  * Arguments: identification string
22  *
23  * Returns: nothing
24  *
25  */
26
27 void rc_openlog(char *ident)
28 {
29         openlog(ident, LOG_PID, RC_LOG_FACILITY);
30 }
31
32 /*
33  * Function: rc_log
34  *
35  * Purpose: log information
36  *
37  * Arguments: priority (just like syslog), rest like printf
38  *
39  * Returns: nothing
40  *
41  */
42
43 void rc_log(int prio, const char *format, ...)
44 {
45         char buff[1024];
46         va_list ap;
47
48         va_start(ap,format);
49     vsnprintf(buff, sizeof(buff), format, ap);
50     va_end(ap);
51
52         syslog(prio, "%s", buff);
53 }