1CLOGIT(3)                       Common      Library     Functions
2CLOGIT(3)
3
4
5
6[1mNAME[0m
7       Clogit ‐ log server messages in local  log  or  in  system
8logger
9
10[1mSYNOPSIS[0m
11       [1m#include "Clog.h"[0m
12
13       [1mint    Cinitlog    (char    *[4m[22mcmd[24m[1m,    char
14*[4m[22mlogfile[24m[1m)[0m
15
16       [1mint    Clogit    (int     [4m[22mlevel[24m[1m,     char
17*[4m[22mfunc[24m[1m, char *[4m[22mmsg[24m[1m, ...)[0m
18
19       [1mint     Cvlogit    (int    [4m[22mlevel[24m[1m,    char
20*[4m[22mfunc[24m[1m,     char     *[4m[22mmsg[24m[1m,     va_list
21[4m[22map[24m[1m)[0m
22
23[1mDESCRIPTION[0m
24       [1mCinitlog [22minitializes the server logging routines.
25
26       [1mClogit  [22mlogs  server  messages in a local log or in
27the system logger.
28
29       [1mCvlogit [22mis the same as [1mClogit  [22mbut  takes  a
30va_list instead of a variable
31       number of arguments.
32
33       [4mcmd[24m     specifies  a  string to be prepended to the
34syslog messages.
35
36       [4mlogfile[0m
37              specifies a path for the server log file. If set to
38[1msyslog[22m,  the
39              system   logger  will  be  used.   By default, only
40messages with
41              level at least as important as  LOG_INFO  will   be
42logged.  The
43              level   threshold   can  be  changed with the envi‐
44ronment variable
45              LOG_PRIORITY.
46
47       [4mlevel[24m  is associated with the message.  The  possi‐
48ble values,  in  order
49              of decreasing importance are:
50
51              [1mLOG_EMERG[0m
52
53              [1mLOG_ALERT[0m
54
55              [1mLOG_CRIT[0m
56
57              [1mLOG_ERR[0m
58
59              [1mLOG_WARNING[0m
60
61              [1mLOG_NOTICE[0m
62
63              [1mLOG_INFO[0m
64
65              [1mLOG_DEBUG[0m
66
67       [4mfunc[24m    is the name of the function that issues the
68message.
69
70       [4mmsg[24m    is a format as in printf.
71
72[1mRETURN VALUE[0m
73       These  routines  return  0 if the operation was successful
74or ‐1 if the
75       operation failed. In the latter case, [1mserrno [22mis set
76appropriately.
77
78[1mERRORS[0m
79       [1mEFAULT       [4m[22mlogfile[24m is a NULL pointer.
80
81       [1mENAMETOOLONG [22mThe length of  [4mlogfile[24m  exceeds
82[1mCA_MAXPATHLEN[22m.
83
84
85
86LCG                                                        $Date$
87CLOGIT(3)
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum