| 1 | .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 |
| 2 | .\" |
| 3 | .\" Standard preamble: |
| 4 | .\" ======================================================================== |
| 5 | .de Sh \" Subsection heading |
| 6 | .br |
| 7 | .if t .Sp |
| 8 | .ne 5 |
| 9 | .PP |
| 10 | \fB\\$1\fR |
| 11 | .PP |
| 12 | .. |
| 13 | .de Sp \" Vertical space (when we can't use .PP) |
| 14 | .if t .sp .5v |
| 15 | .if n .sp |
| 16 | .. |
| 17 | .de Vb \" Begin verbatim text |
| 18 | .ft CW |
| 19 | .nf |
| 20 | .ne \\$1 |
| 21 | .. |
| 22 | .de Ve \" End verbatim text |
| 23 | .ft R |
| 24 | .fi |
| 25 | .. |
| 26 | .\" Set up some character translations and predefined strings. \*(-- will |
| 27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left |
| 28 | .\" double quote, and \*(R" will give a right double quote. | will give a |
| 29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to |
| 30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' |
| 31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. |
| 32 | .tr \(*W-|\(bv\*(Tr |
| 33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' |
| 34 | .ie n \{\ |
| 35 | . ds -- \(*W- |
| 36 | . ds PI pi |
| 37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
| 38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
| 39 | . ds L" "" |
| 40 | . ds R" "" |
| 41 | . ds C` "" |
| 42 | . ds C' "" |
| 43 | 'br\} |
| 44 | .el\{\ |
| 45 | . ds -- \|\(em\| |
| 46 | . ds PI \(*p |
| 47 | . ds L" `` |
| 48 | . ds R" '' |
| 49 | 'br\} |
| 50 | .\" |
| 51 | .\" If the F register is turned on, we'll generate index entries on stderr for |
| 52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index |
| 53 | .\" entries marked with X<> in POD. Of course, you'll have to process the |
| 54 | .\" output yourself in some meaningful fashion. |
| 55 | .if \nF \{\ |
| 56 | . de IX |
| 57 | . tm Index:\\$1\t\\n%\t"\\$2" |
| 58 | .. |
| 59 | . nr % 0 |
| 60 | . rr F |
| 61 | .\} |
| 62 | .\" |
| 63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 64 | .\" way too many mistakes in technical documents. |
| 65 | .hy 0 |
| 66 | .if n .na |
| 67 | .\" |
| 68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). |
| 69 | .\" Fear. Run. Save yourself. No user-serviceable parts. |
| 70 | . \" fudge factors for nroff and troff |
| 71 | .if n \{\ |
| 72 | . ds #H 0 |
| 73 | . ds #V .8m |
| 74 | . ds #F .3m |
| 75 | . ds #[ \f1 |
| 76 | . ds #] \fP |
| 77 | .\} |
| 78 | .if t \{\ |
| 79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
| 80 | . ds #V .6m |
| 81 | . ds #F 0 |
| 82 | . ds #[ \& |
| 83 | . ds #] \& |
| 84 | .\} |
| 85 | . \" simple accents for nroff and troff |
| 86 | .if n \{\ |
| 87 | . ds ' \& |
| 88 | . ds ` \& |
| 89 | . ds ^ \& |
| 90 | . ds , \& |
| 91 | . ds ~ ~ |
| 92 | . ds / |
| 93 | .\} |
| 94 | .if t \{\ |
| 95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
| 96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
| 97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
| 98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
| 99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
| 100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
| 101 | .\} |
| 102 | . \" troff and (daisy-wheel) nroff accents |
| 103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
| 104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
| 105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
| 106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
| 107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
| 108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
| 109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
| 110 | .ds ae a\h'-(\w'a'u*4/10)'e |
| 111 | .ds Ae A\h'-(\w'A'u*4/10)'E |
| 112 | . \" corrections for vroff |
| 113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
| 114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
| 115 | . \" for low resolution devices (crt and lpr) |
| 116 | .if \n(.H>23 .if \n(.V>19 \ |
| 117 | \{\ |
| 118 | . ds : e |
| 119 | . ds 8 ss |
| 120 | . ds o a |
| 121 | . ds d- d\h'-1'\(ga |
| 122 | . ds D- D\h'-1'\(hy |
| 123 | . ds th \o'bp' |
| 124 | . ds Th \o'LP' |
| 125 | . ds ae ae |
| 126 | . ds Ae AE |
| 127 | .\} |
| 128 | .rm #[ #] #H #V #F C |
| 129 | .\" ======================================================================== |
| 130 | .\" |
| 131 | .IX Title "Sys::Syslog 3" |
| 132 | .TH Sys::Syslog 3 "2001-09-21" "perl v5.8.8" "Perl Programmers Reference Guide" |
| 133 | .SH "NAME" |
| 134 | Sys::Syslog \- Perl interface to the UNIX syslog(3) calls |
| 135 | .SH "VERSION" |
| 136 | .IX Header "VERSION" |
| 137 | Version 0.13 |
| 138 | .SH "SYNOPSIS" |
| 139 | .IX Header "SYNOPSIS" |
| 140 | .Vb 3 |
| 141 | \& use Sys::Syslog; # all except setlogsock(), or: |
| 142 | \& use Sys::Syslog qw(:DEFAULT setlogsock); # default set, plus setlogsock() |
| 143 | \& use Sys::Syslog qw(:standard :macros); # standard functions, plus macros |
| 144 | .Ve |
| 145 | .PP |
| 146 | .Vb 5 |
| 147 | \& setlogsock $sock_type; |
| 148 | \& openlog $ident, $logopt, $facility; # don't forget this |
| 149 | \& syslog $priority, $format, @args; |
| 150 | \& $oldmask = setlogmask $mask_priority; |
| 151 | \& closelog; |
| 152 | .Ve |
| 153 | .SH "DESCRIPTION" |
| 154 | .IX Header "DESCRIPTION" |
| 155 | \&\f(CW\*(C`Sys::Syslog\*(C'\fR is an interface to the \s-1UNIX\s0 \f(CWsyslog(3)\fR program. |
| 156 | Call \f(CW\*(C`syslog()\*(C'\fR with a string priority and a list of \f(CW\*(C`printf()\*(C'\fR args |
| 157 | just like \f(CWsyslog(3)\fR. |
| 158 | .SH "EXPORTS" |
| 159 | .IX Header "EXPORTS" |
| 160 | \&\f(CW\*(C`Sys::Syslog\*(C'\fR exports the following \f(CW\*(C`Exporter\*(C'\fR tags: |
| 161 | .IP "\(bu" 4 |
| 162 | \&\f(CW\*(C`:standard\*(C'\fR exports the standard \f(CWsyslog(3)\fR functions: |
| 163 | .Sp |
| 164 | .Vb 1 |
| 165 | \& openlog closelog setlogmask syslog |
| 166 | .Ve |
| 167 | .IP "\(bu" 4 |
| 168 | \&\f(CW\*(C`:extended\*(C'\fR exports the Perl specific functions for \f(CWsyslog(3)\fR: |
| 169 | .Sp |
| 170 | .Vb 1 |
| 171 | \& setlogsock |
| 172 | .Ve |
| 173 | .IP "\(bu" 4 |
| 174 | \&\f(CW\*(C`:macros\*(C'\fR exports the symbols corresponding to most of your \f(CWsyslog(3)\fR |
| 175 | macros. See \*(L"\s-1CONSTANTS\s0\*(R" for the supported constants and their meaning. |
| 176 | .PP |
| 177 | By default, \f(CW\*(C`Sys::Syslog\*(C'\fR exports the symbols from the \f(CW\*(C`:standard\*(C'\fR tag. |
| 178 | .SH "FUNCTIONS" |
| 179 | .IX Header "FUNCTIONS" |
| 180 | .ie n .IP "\fBopenlog($ident, \fB$logopt\fB, \f(BI$facility\fB)\fR" 4 |
| 181 | .el .IP "\fBopenlog($ident, \f(CB$logopt\fB, \f(CB$facility\fB)\fR" 4 |
| 182 | .IX Item "openlog($ident, $logopt, $facility)" |
| 183 | Opens the syslog. |
| 184 | \&\f(CW$ident\fR is prepended to every message. \f(CW$logopt\fR contains zero or |
| 185 | more of the words \f(CW\*(C`pid\*(C'\fR, \f(CW\*(C`ndelay\*(C'\fR, \f(CW\*(C`nowait\*(C'\fR. The \f(CW\*(C`cons\*(C'\fR option is |
| 186 | ignored, since the failover mechanism will drop down to the console |
| 187 | automatically if all other media fail. \f(CW$facility\fR specifies the |
| 188 | part of the system to report about, for example \f(CW\*(C`LOG_USER\*(C'\fR or \f(CW\*(C`LOG_LOCAL0\*(C'\fR: |
| 189 | see your \f(CWsyslog(3)\fR documentation for the facilities available in |
| 190 | your system. Facility can be given as a string or a numeric macro. |
| 191 | .Sp |
| 192 | This function will croak if it can't connect to the syslog daemon. |
| 193 | .Sp |
| 194 | Note that \f(CW\*(C`openlog()\*(C'\fR now takes three arguments, just like \f(CWopenlog(3)\fR. |
| 195 | .Sp |
| 196 | \&\fBYou should use \f(BIopenlog()\fB before calling \f(BIsyslog()\fB.\fR |
| 197 | .Sp |
| 198 | \&\fBOptions\fR |
| 199 | .RS 4 |
| 200 | .IP "*" 4 |
| 201 | \&\f(CW\*(C`ndelay\*(C'\fR \- Open the connection immediately (normally, the connection is |
| 202 | opened when the first message is logged). |
| 203 | .IP "*" 4 |
| 204 | \&\f(CW\*(C`nowait\*(C'\fR \- Don't wait for child processes that may have been created |
| 205 | while logging the message. (The \s-1GNU\s0 C library does not create a child |
| 206 | process, so this option has no effect on Linux.) |
| 207 | .IP "*" 4 |
| 208 | \&\f(CW\*(C`pid\*(C'\fR \- Include \s-1PID\s0 with each message. |
| 209 | .RE |
| 210 | .RS 4 |
| 211 | .Sp |
| 212 | \&\fBExamples\fR |
| 213 | .Sp |
| 214 | Open the syslog with options \f(CW\*(C`ndelay\*(C'\fR and \f(CW\*(C`pid\*(C'\fR, and with facility \f(CW\*(C`LOCAL0\*(C'\fR: |
| 215 | .Sp |
| 216 | .Vb 1 |
| 217 | \& openlog($name, "ndelay,pid", "local0"); |
| 218 | .Ve |
| 219 | .Sp |
| 220 | Same thing, but this time using the macro corresponding to \f(CW\*(C`LOCAL0\*(C'\fR: |
| 221 | .Sp |
| 222 | .Vb 1 |
| 223 | \& openlog($name, "ndelay,pid", LOG_LOCAL0); |
| 224 | .Ve |
| 225 | .RE |
| 226 | .ie n .IP "\fBsyslog($priority, \fB$message\fB)\fR" 4 |
| 227 | .el .IP "\fBsyslog($priority, \f(CB$message\fB)\fR" 4 |
| 228 | .IX Item "syslog($priority, $message)" |
| 229 | .PD 0 |
| 230 | .ie n .IP "\fBsyslog($priority, \fB$format\fB, \f(BI@args\fB)\fR" 4 |
| 231 | .el .IP "\fBsyslog($priority, \f(CB$format\fB, \f(CB@args\fB)\fR" 4 |
| 232 | .IX Item "syslog($priority, $format, @args)" |
| 233 | .PD |
| 234 | If \f(CW$priority\fR permits, logs \f(CW$message\fR or \f(CW\*(C`sprintf($format, @args)\*(C'\fR |
| 235 | with the addition that \f(CW%m\fR in \f(CW$message\fR or \f(CW$format\fR is replaced with |
| 236 | \&\f(CW"$!"\fR (the latest error message). |
| 237 | .Sp |
| 238 | \&\f(CW$priority\fR can specify a level, or a level and a facility. Levels and |
| 239 | facilities can be given as strings or as macros. |
| 240 | .Sp |
| 241 | If you didn't use \f(CW\*(C`openlog()\*(C'\fR before using \f(CW\*(C`syslog()\*(C'\fR, \f(CW\*(C`syslog()\*(C'\fR will |
| 242 | try to guess the \f(CW$ident\fR by extracting the shortest prefix of |
| 243 | \&\f(CW$format\fR that ends in a \f(CW":"\fR. |
| 244 | .Sp |
| 245 | \&\fBExamples\fR |
| 246 | .Sp |
| 247 | .Vb 2 |
| 248 | \& syslog("info", $message); # informational level |
| 249 | \& syslog(LOG_INFO, $message); # informational level |
| 250 | .Ve |
| 251 | .Sp |
| 252 | .Vb 2 |
| 253 | \& syslog("info|local0", $message); # information level, Local0 facility |
| 254 | \& syslog(LOG_INFO|LOG_LOCAL0, $message); # information level, Local0 facility |
| 255 | .Ve |
| 256 | .RS 4 |
| 257 | .IP "\fBNote\fR" 4 |
| 258 | .IX Item "Note" |
| 259 | \&\f(CW\*(C`Sys::Syslog\*(C'\fR version v0.07 and older passed the \f(CW$message\fR as the |
| 260 | formatting string to \f(CW\*(C`sprintf()\*(C'\fR even when no formatting arguments |
| 261 | were provided. If the code calling \f(CW\*(C`syslog()\*(C'\fR might execute with |
| 262 | older versions of this module, make sure to call the function as |
| 263 | \&\f(CW\*(C`syslog($priority, "%s", $message)\*(C'\fR instead of \f(CW\*(C`syslog($priority, |
| 264 | $message)\*(C'\fR. This protects against hostile formatting sequences that |
| 265 | might show up if \f(CW$message\fR contains tainted data. |
| 266 | .RE |
| 267 | .RS 4 |
| 268 | .RE |
| 269 | .IP "\fBsetlogmask($mask_priority)\fR" 4 |
| 270 | .IX Item "setlogmask($mask_priority)" |
| 271 | Sets the log mask for the current process to \f(CW$mask_priority\fR and |
| 272 | returns the old mask. If the mask argument is 0, the current log mask |
| 273 | is not modified. See \*(L"Levels\*(R" for the list of available levels. |
| 274 | .Sp |
| 275 | \&\fBExamples\fR |
| 276 | .Sp |
| 277 | Only log errors: |
| 278 | .Sp |
| 279 | .Vb 1 |
| 280 | \& setlogmask(LOG_ERR); |
| 281 | .Ve |
| 282 | .Sp |
| 283 | Log critical messages, errors and warnings: |
| 284 | .Sp |
| 285 | .Vb 1 |
| 286 | \& setlogmask(LOG_CRIT|LOG_ERR|LOG_WARNING); |
| 287 | .Ve |
| 288 | .IP "\fBsetlogsock($sock_type)\fR" 4 |
| 289 | .IX Item "setlogsock($sock_type)" |
| 290 | .PD 0 |
| 291 | .ie n .IP "\fBsetlogsock($sock_type, \fB$stream_location\fB)\fR (added in 5.004_02)" 4 |
| 292 | .el .IP "\fBsetlogsock($sock_type, \f(CB$stream_location\fB)\fR (added in 5.004_02)" 4 |
| 293 | .IX Item "setlogsock($sock_type, $stream_location) (added in 5.004_02)" |
| 294 | .PD |
| 295 | Sets the socket type to be used for the next call to |
| 296 | \&\f(CW\*(C`openlog()\*(C'\fR or \f(CW\*(C`syslog()\*(C'\fR and returns true on success, |
| 297 | \&\f(CW\*(C`undef\*(C'\fR on failure. |
| 298 | .Sp |
| 299 | A value of \f(CW"unix"\fR will connect to the \s-1UNIX\s0 domain socket (in some |
| 300 | systems a character special device) returned by the \f(CW\*(C`_PATH_LOG\*(C'\fR macro |
| 301 | (if your system defines it), or \fI/dev/log\fR or \fI/dev/conslog\fR, |
| 302 | whatever is writable. A value of 'stream' will connect to the stream |
| 303 | indicated by the pathname provided as the optional second parameter. |
| 304 | (For example Solaris and \s-1IRIX\s0 require \f(CW"stream"\fR instead of \f(CW"unix"\fR.) |
| 305 | A value of \f(CW"inet"\fR will connect to an \s-1INET\s0 socket (either \f(CW\*(C`tcp\*(C'\fR or \f(CW\*(C`udp\*(C'\fR, |
| 306 | tried in that order) returned by \f(CW\*(C`getservbyname()\*(C'\fR. \f(CW"tcp"\fR and \f(CW"udp"\fR can |
| 307 | also be given as values. The value \f(CW"console"\fR will send messages |
| 308 | directly to the console, as for the \f(CW"cons"\fR option in the logopts in |
| 309 | \&\f(CW\*(C`openlog()\*(C'\fR. |
| 310 | .Sp |
| 311 | A reference to an array can also be passed as the first parameter. |
| 312 | When this calling method is used, the array should contain a list of |
| 313 | sock_types which are attempted in order. |
| 314 | .Sp |
| 315 | The default is to try \f(CW\*(C`tcp\*(C'\fR, \f(CW\*(C`udp\*(C'\fR, \f(CW\*(C`unix\*(C'\fR, \f(CW\*(C`stream\*(C'\fR, \f(CW\*(C`console\*(C'\fR. |
| 316 | .Sp |
| 317 | Giving an invalid value for \f(CW$sock_type\fR will croak. |
| 318 | .IP "\fB\f(BIcloselog()\fB\fR" 4 |
| 319 | .IX Item "closelog()" |
| 320 | Closes the log file and return true on success. |
| 321 | .SH "EXAMPLES" |
| 322 | .IX Header "EXAMPLES" |
| 323 | .Vb 4 |
| 324 | \& openlog($program, 'cons,pid', 'user'); |
| 325 | \& syslog('info', '%s', 'this is another test'); |
| 326 | \& syslog('mail|warning', 'this is a better test: %d', time); |
| 327 | \& closelog(); |
| 328 | .Ve |
| 329 | .PP |
| 330 | .Vb 1 |
| 331 | \& syslog('debug', 'this is the last test'); |
| 332 | .Ve |
| 333 | .PP |
| 334 | .Vb 3 |
| 335 | \& setlogsock('unix'); |
| 336 | \& openlog("$program $$", 'ndelay', 'user'); |
| 337 | \& syslog('notice', 'fooprogram: this is really done'); |
| 338 | .Ve |
| 339 | .PP |
| 340 | .Vb 3 |
| 341 | \& setlogsock('inet'); |
| 342 | \& $! = 55; |
| 343 | \& syslog('info', 'problem was %m'); # %m == $! in syslog(3) |
| 344 | .Ve |
| 345 | .PP |
| 346 | .Vb 5 |
| 347 | \& # Log to UDP port on $remotehost instead of logging locally |
| 348 | \& setlogsock('udp'); |
| 349 | \& $Sys::Syslog::host = $remotehost; |
| 350 | \& openlog($program, 'ndelay', 'user'); |
| 351 | \& syslog('info', 'something happened over here'); |
| 352 | .Ve |
| 353 | .SH "CONSTANTS" |
| 354 | .IX Header "CONSTANTS" |
| 355 | .Sh "Facilities" |
| 356 | .IX Subsection "Facilities" |
| 357 | .IP "\(bu" 4 |
| 358 | \&\f(CW\*(C`LOG_AUTH\*(C'\fR \- security/authorization messages |
| 359 | .IP "\(bu" 4 |
| 360 | \&\f(CW\*(C`LOG_AUTHPRIV\*(C'\fR \- security/authorization messages (private) |
| 361 | .IP "\(bu" 4 |
| 362 | \&\f(CW\*(C`LOG_CRON\*(C'\fR \- clock daemon (\fBcron\fR and \fBat\fR) |
| 363 | .IP "\(bu" 4 |
| 364 | \&\f(CW\*(C`LOG_DAEMON\*(C'\fR \- system daemons without separate facility value |
| 365 | .IP "\(bu" 4 |
| 366 | \&\f(CW\*(C`LOG_FTP\*(C'\fR \- ftp daemon |
| 367 | .IP "\(bu" 4 |
| 368 | \&\f(CW\*(C`LOG_KERN\*(C'\fR \- kernel messages |
| 369 | .IP "\(bu" 4 |
| 370 | \&\f(CW\*(C`LOG_LOCAL0\*(C'\fR through \f(CW\*(C`LOG_LOCAL7\*(C'\fR \- reserved for local use |
| 371 | .IP "\(bu" 4 |
| 372 | \&\f(CW\*(C`LOG_LPR\*(C'\fR \- line printer subsystem |
| 373 | .IP "\(bu" 4 |
| 374 | \&\f(CW\*(C`LOG_MAIL\*(C'\fR \- mail subsystem |
| 375 | .IP "\(bu" 4 |
| 376 | \&\f(CW\*(C`LOG_NEWS\*(C'\fR \- \s-1USENET\s0 news subsystem |
| 377 | .IP "\(bu" 4 |
| 378 | \&\f(CW\*(C`LOG_SYSLOG\*(C'\fR \- messages generated internally by \fBsyslogd\fR |
| 379 | .IP "\(bu" 4 |
| 380 | \&\f(CW\*(C`LOG_USER\*(C'\fR (default) \- generic user-level messages |
| 381 | .IP "\(bu" 4 |
| 382 | \&\f(CW\*(C`LOG_UUCP\*(C'\fR \- \s-1UUCP\s0 subsystem |
| 383 | .Sh "Levels" |
| 384 | .IX Subsection "Levels" |
| 385 | .IP "\(bu" 4 |
| 386 | \&\f(CW\*(C`LOG_EMERG\*(C'\fR \- system is unusable |
| 387 | .IP "\(bu" 4 |
| 388 | \&\f(CW\*(C`LOG_ALERT\*(C'\fR \- action must be taken immediately |
| 389 | .IP "\(bu" 4 |
| 390 | \&\f(CW\*(C`LOG_CRIT\*(C'\fR \- critical conditions |
| 391 | .IP "\(bu" 4 |
| 392 | \&\f(CW\*(C`LOG_ERR\*(C'\fR \- error conditions |
| 393 | .IP "\(bu" 4 |
| 394 | \&\f(CW\*(C`LOG_WARNING\*(C'\fR \- warning conditions |
| 395 | .IP "\(bu" 4 |
| 396 | \&\f(CW\*(C`LOG_NOTICE\*(C'\fR \- normal, but significant, condition |
| 397 | .IP "\(bu" 4 |
| 398 | \&\f(CW\*(C`LOG_INFO\*(C'\fR \- informational message |
| 399 | .IP "\(bu" 4 |
| 400 | \&\f(CW\*(C`LOG_DEBUG\*(C'\fR \- debug-level message |
| 401 | .SH "DIAGNOSTICS" |
| 402 | .IX Header "DIAGNOSTICS" |
| 403 | .IP "Invalid argument passed to setlogsock" 4 |
| 404 | .IX Item "Invalid argument passed to setlogsock" |
| 405 | \&\fB(F)\fR You gave \f(CW\*(C`setlogsock()\*(C'\fR an invalid value for \f(CW$sock_type\fR. |
| 406 | .IP "no connection to syslog available" 4 |
| 407 | .IX Item "no connection to syslog available" |
| 408 | \&\fB(F)\fR \f(CW\*(C`syslog()\*(C'\fR failed to connect to the specified socket. |
| 409 | .ie n .IP "stream passed to setlogsock, but %s is not writable" 4 |
| 410 | .el .IP "stream passed to setlogsock, but \f(CW%s\fR is not writable" 4 |
| 411 | .IX Item "stream passed to setlogsock, but %s is not writable" |
| 412 | \&\fB(W)\fR You asked \f(CW\*(C`setlogsock()\*(C'\fR to use a stream socket, but the given |
| 413 | path is not writable. |
| 414 | .IP "stream passed to setlogsock, but could not find any device" 4 |
| 415 | .IX Item "stream passed to setlogsock, but could not find any device" |
| 416 | \&\fB(W)\fR You asked \f(CW\*(C`setlogsock()\*(C'\fR to use a stream socket, but didn't |
| 417 | provide a path, and \f(CW\*(C`Sys::Syslog\*(C'\fR was unable to find an appropriate one. |
| 418 | .IP "tcp passed to setlogsock, but tcp service unavailable" 4 |
| 419 | .IX Item "tcp passed to setlogsock, but tcp service unavailable" |
| 420 | \&\fB(W)\fR You asked \f(CW\*(C`setlogsock()\*(C'\fR to use a \s-1TCP\s0 socket, but the service |
| 421 | is not available on the system. |
| 422 | .ie n .IP "syslog: expecting argument %s" 4 |
| 423 | .el .IP "syslog: expecting argument \f(CW%s\fR" 4 |
| 424 | .IX Item "syslog: expecting argument %s" |
| 425 | \&\fB(F)\fR You forgot to give \f(CW\*(C`syslog()\*(C'\fR the indicated argument. |
| 426 | .ie n .IP "syslog: invalid level/facility: %s" 4 |
| 427 | .el .IP "syslog: invalid level/facility: \f(CW%s\fR" 4 |
| 428 | .IX Item "syslog: invalid level/facility: %s" |
| 429 | \&\fB(F)\fR You specified an invalid level or facility, like \f(CW\*(C`LOG_KERN\*(C'\fR |
| 430 | (which is reserved to the kernel). |
| 431 | .ie n .IP "syslog: too many levels given: %s" 4 |
| 432 | .el .IP "syslog: too many levels given: \f(CW%s\fR" 4 |
| 433 | .IX Item "syslog: too many levels given: %s" |
| 434 | \&\fB(F)\fR You specified too many levels. |
| 435 | .ie n .IP "syslog: too many facilities given: %s" 4 |
| 436 | .el .IP "syslog: too many facilities given: \f(CW%s\fR" 4 |
| 437 | .IX Item "syslog: too many facilities given: %s" |
| 438 | \&\fB(F)\fR You specified too many facilities. |
| 439 | .IP "syslog: level must be given" 4 |
| 440 | .IX Item "syslog: level must be given" |
| 441 | \&\fB(F)\fR You forgot to specify a level. |
| 442 | .IP "udp passed to setlogsock, but udp service unavailable" 4 |
| 443 | .IX Item "udp passed to setlogsock, but udp service unavailable" |
| 444 | \&\fB(W)\fR You asked \f(CW\*(C`setlogsock()\*(C'\fR to use a \s-1UDP\s0 socket, but the service |
| 445 | is not available on the system. |
| 446 | .IP "unix passed to setlogsock, but path not available" 4 |
| 447 | .IX Item "unix passed to setlogsock, but path not available" |
| 448 | \&\fB(W)\fR You asked \f(CW\*(C`setlogsock()\*(C'\fR to use a \s-1UNIX\s0 socket, but \f(CW\*(C`Sys::Syslog\*(C'\fR |
| 449 | was unable to find an appropriate an appropriate device. |
| 450 | .SH "SEE ALSO" |
| 451 | .IX Header "SEE ALSO" |
| 452 | \&\fIsyslog\fR\|(3) |
| 453 | .PP |
| 454 | \&\fISyslogging with Perl\fR, <http://lexington.pm.org/meetings/022001.html> |
| 455 | .SH "AUTHOR" |
| 456 | .IX Header "AUTHOR" |
| 457 | Tom Christiansen <\fItchrist@perl.com\fR> and Larry Wall |
| 458 | <\fIlarry@wall.org\fR>. |
| 459 | .PP |
| 460 | \&\s-1UNIX\s0 domain sockets added by Sean Robinson |
| 461 | <\fIrobinson_s@sc.maricopa.edu\fR> with support from Tim Bunce |
| 462 | <\fITim.Bunce@ig.co.uk\fR> and the \f(CW\*(C`perl5\-porters\*(C'\fR mailing list. |
| 463 | .PP |
| 464 | Dependency on \fIsyslog.ph\fR replaced with \s-1XS\s0 code by Tom Hughes |
| 465 | <\fItom@compton.nu\fR>. |
| 466 | .PP |
| 467 | Code for \f(CW\*(C`constant()\*(C'\fRs regenerated by Nicholas Clark <\fInick@ccl4.org\fR>. |
| 468 | .PP |
| 469 | Failover to different communication modes by Nick Williams |
| 470 | <\fINick.Williams@morganstanley.com\fR>. |
| 471 | .PP |
| 472 | Extracted from core distribution for publishing on the \s-1CPAN\s0 by |
| 473 | Se\*'bastien Aperghis-Tramoni <sebastien@aperghis.net>. |
| 474 | .SH "BUGS" |
| 475 | .IX Header "BUGS" |
| 476 | Please report any bugs or feature requests to |
| 477 | \&\f(CW\*(C`bug\-sys\-syslog at rt.cpan.org\*(C'\fR, or through the web interface at |
| 478 | <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sys\-Syslog>. |
| 479 | I will be notified, and then you'll automatically be notified of progress on |
| 480 | your bug as I make changes. |
| 481 | .SH "SUPPORT" |
| 482 | .IX Header "SUPPORT" |
| 483 | You can find documentation for this module with the perldoc command. |
| 484 | .PP |
| 485 | .Vb 1 |
| 486 | \& perldoc Sys::Syslog |
| 487 | .Ve |
| 488 | .PP |
| 489 | You can also look for information at: |
| 490 | .IP "* AnnoCPAN: Annotated \s-1CPAN\s0 documentation" 4 |
| 491 | .IX Item "AnnoCPAN: Annotated CPAN documentation" |
| 492 | <http://annocpan.org/dist/Sys\-Syslog> |
| 493 | .IP "* \s-1CPAN\s0 Ratings" 4 |
| 494 | .IX Item "CPAN Ratings" |
| 495 | <http://cpanratings.perl.org/d/Sys\-Syslog> |
| 496 | .IP "* \s-1RT:\s0 \s-1CPAN\s0's request tracker" 4 |
| 497 | .IX Item "RT: CPAN's request tracker" |
| 498 | <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Sys\-Syslog> |
| 499 | .IP "* Search \s-1CPAN\s0" 4 |
| 500 | .IX Item "Search CPAN" |
| 501 | <http://search.cpan.org/dist/Sys\-Syslog> |
| 502 | .SH "LICENSE" |
| 503 | .IX Header "LICENSE" |
| 504 | This program is free software; you can redistribute it and/or modify it |
| 505 | under the same terms as Perl itself. |