Merge from vendor branch HEIMDAL:
[dragonfly.git] / crypto / heimdal-0.6.3 / lib / krb5 / krb5_openlog.cat3
1
2 KRB5_OPENLOG(3)            UNIX Programmer's Manual            KRB5_OPENLOG(3)
3
4 N\bNA\bAM\bME\bE
5      k\bkr\brb\bb5\b5_\b_i\bin\bni\bit\btl\blo\bog\bg, k\bkr\brb\bb5\b5_\b_o\bop\bpe\ben\bnl\blo\bog\bg, k\bkr\brb\bb5\b5_\b_c\bcl\blo\bos\bse\bel\blo\bog\bg, k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_d\bde\bes\bst\bt,
6      k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_f\bfu\bun\bnc\bc, k\bkr\brb\bb5\b5_\b_l\blo\bog\bg, k\bkr\brb\bb5\b5_\b_v\bvl\blo\bog\bg, k\bkr\brb\bb5\b5_\b_l\blo\bog\bg_\b_m\bms\bsg\bg, k\bkr\brb\bb5\b5_\b_v\bvl\blo\bog\bg_\b_m\bms\bsg\bg -
7      Heimdal logging functions
8
9 L\bLI\bIB\bBR\bRA\bAR\bRY\bY
10      Kerberos 5 Library (libkrb5, -lkrb5)
11
12 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
13      _\bt_\by_\bp_\be_\bd_\be_\bf _\bv_\bo_\bi_\bd
14      (*\b*k\bkr\brb\bb5\b5_\b_l\blo\bog\bg_\b_l\blo\bog\bg_\b_f\bfu\bun\bnc\bc_\b_t\bt)(_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bt_\bi_\bm_\be, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bm_\be_\bs_\bs_\ba_\bg_\be, _\bv_\bo_\bi_\bd _\b*_\bd_\ba_\bt_\ba)
15
16      _\bt_\by_\bp_\be_\bd_\be_\bf _\bv_\bo_\bi_\bd
17      (*\b*k\bkr\brb\bb5\b5_\b_l\blo\bog\bg_\b_c\bcl\blo\bos\bse\be_\b_f\bfu\bun\bnc\bc_\b_t\bt)(_\bv_\bo_\bi_\bd _\b*_\bd_\ba_\bt_\ba)
18
19      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
20      k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_d\bde\bes\bst\bt(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by,
21              _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bd_\be_\bs_\bt_\bi_\bn_\ba_\bt_\bi_\bo_\bn)
22
23      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
24      k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_f\bfu\bun\bnc\bc(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by,
25              _\bi_\bn_\bt _\bm_\bi_\bn, _\bi_\bn_\bt _\bm_\ba_\bx, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bl_\bo_\bg_\b__\bf_\bu_\bn_\bc_\b__\bt _\bl_\bo_\bg,
26              _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bc_\bl_\bo_\bs_\be_\b__\bf_\bu_\bn_\bc_\b__\bt _\bc_\bl_\bo_\bs_\be, _\bv_\bo_\bi_\bd _\b*_\bd_\ba_\bt_\ba)
27
28      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
29      k\bkr\brb\bb5\b5_\b_c\bcl\blo\bos\bse\bel\blo\bog\bg(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by)
30
31      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
32      k\bkr\brb\bb5\b5_\b_i\bin\bni\bit\btl\blo\bog\bg(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bp_\br_\bo_\bg_\br_\ba_\bm,
33              _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by)
34
35      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
36      k\bkr\brb\bb5\b5_\b_l\blo\bog\bg(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by, _\bi_\bn_\bt _\bl_\be_\bv_\be_\bl,
37              _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bo_\br_\bm_\ba_\bt, _\b._\b._\b.)
38
39      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
40      k\bkr\brb\bb5\b5_\b_l\blo\bog\bg_\b_m\bms\bsg\bg(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by,
41              _\bc_\bh_\ba_\br _\b*_\b*_\br_\be_\bp_\bl_\by, _\bi_\bn_\bt _\bl_\be_\bv_\be_\bl, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bo_\br_\bm_\ba_\bt, _\b._\b._\b.)
42
43      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
44      k\bkr\brb\bb5\b5_\b_o\bop\bpe\ben\bnl\blo\bog\bg(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bp_\br_\bo_\bg_\br_\ba_\bm,
45              _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by)
46
47      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
48      k\bkr\brb\bb5\b5_\b_v\bvl\blo\bog\bg(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by, _\bi_\bn_\bt _\bl_\be_\bv_\be_\bl,
49              _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bo_\br_\bm_\ba_\bt, _\bv_\ba_\b__\bl_\bi_\bs_\bt _\ba_\br_\bg_\bl_\bi_\bs_\bt)
50
51      _\bk_\br_\bb_\b5_\b__\be_\br_\br_\bo_\br_\b__\bc_\bo_\bd_\be
52      k\bkr\brb\bb5\b5_\b_v\bvl\blo\bog\bg_\b_m\bms\bsg\bg(_\bk_\br_\bb_\b5_\b__\bc_\bo_\bn_\bt_\be_\bx_\bt _\bc_\bo_\bn_\bt_\be_\bx_\bt, _\bk_\br_\bb_\b5_\b__\bl_\bo_\bg_\b__\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by _\b*_\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by,
53              _\bc_\bh_\ba_\br _\b*_\b*_\br_\be_\bp_\bl_\by, _\bi_\bn_\bt _\bl_\be_\bv_\be_\bl, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bo_\br_\bm_\ba_\bt, _\bv_\ba_\b__\bl_\bi_\bs_\bt _\ba_\br_\bg_\bl_\bi_\bs_\bt)
54
55 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
56      These functions logs messages to one or more destinations.
57
58      The k\bkr\brb\bb5\b5_\b_o\bop\bpe\ben\bnl\blo\bog\bg() function creates a logging _\bf_\ba_\bc_\bi_\bl_\bi_\bt_\by, that is used to
59      log messages. A facility consists of one or more destinations (which can
60      be files or syslog or some other device). The _\bp_\br_\bo_\bg_\br_\ba_\bm parameter should be
61      the generic name of the program that is doing the logging. This name is
62      used to lookup which destinations to use. This information is contained
63      in the logging section of the _\bk_\br_\bb_\b5_\b._\bc_\bo_\bn_\bf configuration file.  If no entry
64      is found for _\bp_\br_\bo_\bg_\br_\ba_\bm, the entry for default is used, or if that is miss-
65      ing too, SYSLOG will be used as destination.
66
67      To close a logging facility, use the k\bkr\brb\bb5\b5_\b_c\bcl\blo\bos\bse\bel\blo\bog\bg() function.
68
69      To log a message to a facility use one of the functions k\bkr\brb\bb5\b5_\b_l\blo\bog\bg(),
70      k\bkr\brb\bb5\b5_\b_l\blo\bog\bg_\b_m\bms\bsg\bg(), k\bkr\brb\bb5\b5_\b_v\bvl\blo\bog\bg(), or k\bkr\brb\bb5\b5_\b_v\bvl\blo\bog\bg_\b_m\bms\bsg\bg().  The functions ending in
71      _msg return in _\br_\be_\bp_\bl_\by a pointer to the message that just got logged. This
72      string is allocated, and should be freed with f\bfr\bre\bee\be().  The _\bf_\bo_\br_\bm_\ba_\bt is a
73      standard p\bpr\bri\bin\bnt\btf\bf() style format string (but see the BUGS section).
74
75      If you want better control of where things gets logged, you can instead
76      of using k\bkr\brb\bb5\b5_\b_o\bop\bpe\ben\bnl\blo\bog\bg() call k\bkr\brb\bb5\b5_\b_i\bin\bni\bit\btl\blo\bog\bg(), which just initializes a fa-
77      cility, but doesn't define any actual logging destinations. You can then
78      add destinations with the k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_d\bde\bes\bst\bt() and k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_f\bfu\bun\bnc\bc() func-
79      tions.  The first of these takes a string specifying a logging destina-
80      tion, and adds this to the facility. If you want to do some non-standard
81      logging you can use the k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_f\bfu\bun\bnc\bc() function, which takes a func-
82      tion to use when logging.  The _\bl_\bo_\bg function is called for each message
83      with _\bt_\bi_\bm_\be being a string specifying the current time, and _\bm_\be_\bs_\bs_\ba_\bg_\be the
84      message to log.  _\bc_\bl_\bo_\bs_\be is called when the facility is closed. You can
85      pass application specific data in the _\bd_\ba_\bt_\ba parameter. The _\bm_\bi_\bn and _\bm_\ba_\bx pa-
86      rameter are the same as in a destination (defined below). To specify a
87      max of infinity, pass -1.
88
89      k\bkr\brb\bb5\b5_\b_o\bop\bpe\ben\bnl\blo\bog\bg() calls k\bkr\brb\bb5\b5_\b_i\bin\bni\bit\btl\blo\bog\bg() and then calls k\bkr\brb\bb5\b5_\b_a\bad\bdd\bdl\blo\bog\bg_\b_d\bde\bes\bst\bt() for
90      each destination found.
91
92    D\bDe\bes\bst\bti\bin\bna\bat\bti\bio\bon\bns\bs
93      The defined destinations (as specified in _\bk_\br_\bb_\b5_\b._\bc_\bo_\bn_\bf) follows:
94
95            STDERR
96                 This logs to the program's stderr.
97
98            FILE:_\b/_\bf_\bi_\bl_\be
99
100            FILE=_\b/_\bf_\bi_\bl_\be
101                 Log to the specified file. The form using a colon appends to
102                 the file, the form with an equal truncates the file. The trun-
103                 cating form keeps the file open, while the appending form
104                 closes it after each log message (which makes it possible to
105                 rotate logs). The truncating form is mainly for compatibility
106                 with the MIT libkrb5.
107
108            DEVICE=_\b/_\bd_\be_\bv_\bi_\bc_\be
109                 This logs to the specified device, at present this is the same
110                 as FILE:/device.
111
112            CONSOLE
113                 Log to the console, this is the same as DEVICE=/dev/console.
114
115            SYSLOG[:priority[:facility]]
116                 Send messages to the syslog system, using priority, and facil-
117                 ity. To get the name for one of these, you take the name of
118                 the macro passed to syslog(3),  and remove the leading LOG_
119                 (LOG_NOTICE becomes NOTICE). The default values (as well as
120                 the values used for unrecognised values), are ERR, and AUTH,
121                 respectively.  See syslog(3) for a list of priorities and fa-
122                 cilities.
123
124      Each destination may optionally be prepended with a range of logging lev-
125      els, specified as min-max/. If the _\bl_\be_\bv_\be_\bl parameter to k\bkr\brb\bb5\b5_\b_l\blo\bog\bg() is with-
126      in this range (inclusive) the message gets logged to this destination,
127      otherwise not. Either of the min and max valued may be omitted, in this
128      case min is assumed to be zero, and max is assumed to be infinity.  If
129      you don't include a dash, both min and max gets set to the specified val-
130      ue. If no range is specified, all messages gets logged.
131
132 E\bEX\bXA\bAM\bMP\bPL\bLE\bE
133            [logging]
134                    kdc = 0/FILE:/var/log/kdc.log
135                    kdc = 1-/SYSLOG:INFO:USER
136                    default = STDERR
137
138      This will log all messages from the k\bkd\bdc\bc program with level 0 to
139      _\b/_\bv_\ba_\br_\b/_\bl_\bo_\bg_\b/_\bk_\bd_\bc_\b._\bl_\bo_\bg, other messages will be logged to syslog with priority
140      LOG_INFO, and facility LOG_USER. All other programs will log all messages
141      to their stderr.
142
143 B\bBU\bUG\bGS\bS
144      These functions use a\bas\bsp\bpr\bri\bin\bnt\btf\bf() to format the message. If your operating
145      system does not have a working a\bas\bsp\bpr\bri\bin\bnt\btf\bf(), a replacement will be used. At
146      present this replacement does not handle some correct conversion specifi-
147      cations (like floating point numbers). Until this is fixed, the use of
148      these conversions should be avoided.
149
150      If logging is done to the syslog facility, these functions might not be
151      thread-safe, depending on the implementation of o\bop\bpe\ben\bnl\blo\bog\bg(), and s\bsy\bys\bsl\blo\bog\bg().
152
153 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
154      syslog(3),  krb5.conf(5)
155
156  HEIMDAL                        August 6, 1997                               3