home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / python / pytexdoc / ext / lib / lib1 / syslog / tex
LaTeX Document  |  1996-11-08  |  2.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 42 75 69 6c 74 2d 69 |\section|{Built-i|
|00000010| 6e 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |n Module| \sectco|
|00000020| 64 65 7b 73 79 73 6c 6f | 67 7d 7d 0a 5c 62 69 6d |de{syslo|g}}.\bim|
|00000030| 6f 64 69 6e 64 65 78 7b | 73 79 73 6c 6f 67 7d 0a |odindex{|syslog}.|
|00000040| 0a 54 68 69 73 20 6d 6f | 64 75 6c 65 20 70 72 6f |.This mo|dule pro|
|00000050| 76 69 64 65 73 20 61 6e | 20 69 6e 74 65 72 66 61 |vides an| interfa|
|00000060| 63 65 20 74 6f 20 74 68 | 65 20 55 6e 69 78 20 5c |ce to th|e Unix \|
|00000070| 63 6f 64 65 7b 73 79 73 | 6c 6f 67 7d 20 6c 69 62 |code{sys|log} lib|
|00000080| 72 61 72 79 0a 72 6f 75 | 74 69 6e 65 73 2e 20 20 |rary.rou|tines. |
|00000090| 52 65 66 65 72 20 74 6f | 20 74 68 65 20 5c 55 4e |Refer to| the \UN|
|000000a0| 49 58 7b 7d 20 6d 61 6e | 75 61 6c 20 70 61 67 65 |IX{} man|ual page|
|000000b0| 73 20 66 6f 72 20 61 20 | 64 65 74 61 69 6c 65 64 |s for a |detailed|
|000000c0| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 0a 6f 66 20 | descrip|tion.of |
|000000d0| 74 68 65 20 5c 63 6f 64 | 65 7b 73 79 73 6c 6f 67 |the \cod|e{syslog|
|000000e0| 7d 20 66 61 63 69 6c 69 | 74 79 2e 0a 0a 54 68 65 |} facili|ty...The|
|000000f0| 20 6d 6f 64 75 6c 65 20 | 64 65 66 69 6e 65 73 20 | module |defines |
|00000100| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 66 75 |the foll|owing fu|
|00000110| 6e 63 74 69 6f 6e 73 3a | 0a 0a 5c 62 65 67 69 6e |nctions:|..\begin|
|00000120| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 73 79 73 6c 6f |{funcdes|c}{syslo|
|00000130| 67 7d 7b 5c 6f 70 74 69 | 6f 6e 61 6c 7b 70 72 69 |g}{\opti|onal{pri|
|00000140| 6f 72 69 74 79 5c 2c 7d | 20 6d 65 73 73 61 67 65 |ority\,}| message|
|00000150| 7d 0a 53 65 6e 64 20 74 | 68 65 20 73 74 72 69 6e |}.Send t|he strin|
|00000160| 67 20 5c 76 61 72 7b 6d | 65 73 73 61 67 65 7d 20 |g \var{m|essage} |
|00000170| 74 6f 20 74 68 65 20 73 | 79 73 74 65 6d 20 6c 6f |to the s|ystem lo|
|00000180| 67 67 65 72 2e 0a 41 20 | 74 72 61 69 6c 69 6e 67 |gger..A |trailing|
|00000190| 20 6e 65 77 6c 69 6e 65 | 20 69 73 20 61 64 64 65 | newline| is adde|
|000001a0| 64 20 69 66 20 6e 65 63 | 65 73 73 61 72 79 2e 0a |d if nec|essary..|
|000001b0| 45 61 63 68 20 6d 65 73 | 73 61 67 65 20 69 73 20 |Each mes|sage is |
|000001c0| 74 61 67 67 65 64 20 77 | 69 74 68 20 61 20 70 72 |tagged w|ith a pr|
|000001d0| 69 6f 72 69 74 79 20 63 | 6f 6d 70 6f 73 65 64 20 |iority c|omposed |
|000001e0| 6f 66 20 61 20 5c 76 61 | 72 7b 66 61 63 69 6c 69 |of a \va|r{facili|
|000001f0| 74 79 7d 20 61 6e 64 0a | 61 20 5c 76 61 72 7b 6c |ty} and.|a \var{l|
|00000200| 65 76 65 6c 7d 2e 0a 54 | 68 65 20 6f 70 74 69 6f |evel}..T|he optio|
|00000210| 6e 61 6c 20 5c 76 61 72 | 7b 70 72 69 6f 72 69 74 |nal \var|{priorit|
|00000220| 79 7d 20 61 72 67 75 6d | 65 6e 74 2c 20 77 68 69 |y} argum|ent, whi|
|00000230| 63 68 20 64 65 66 61 75 | 6c 74 73 20 74 6f 0a 5c |ch defau|lts to.\|
|00000240| 63 6f 64 65 7b 28 4c 4f | 47 5f 55 53 45 52 20 7c |code{(LO|G_USER ||
|00000250| 20 4c 4f 47 5f 49 4e 46 | 4f 29 7d 2c 20 64 65 74 | LOG_INF|O)}, det|
|00000260| 65 72 6d 69 6e 65 73 20 | 74 68 65 20 6d 65 73 73 |ermines |the mess|
|00000270| 61 67 65 20 70 72 69 6f | 72 69 74 79 2e 0a 5c 65 |age prio|rity..\e|
|00000280| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0a 0a 5c 62 |nd{funcd|esc}..\b|
|00000290| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 6f |egin{fun|cdesc}{o|
|000002a0| 70 65 6e 6c 6f 67 7d 7b | 69 64 65 6e 74 5c 2c 20 |penlog}{|ident\, |
|000002b0| 5c 6f 70 74 69 6f 6e 61 | 6c 7b 6c 6f 67 6f 70 74 |\optiona|l{logopt|
|000002c0| 5c 2c 20 5c 6f 70 74 69 | 6f 6e 61 6c 7b 66 61 63 |\, \opti|onal{fac|
|000002d0| 69 6c 69 74 79 7d 7d 7d | 0a 4c 6f 67 67 69 6e 67 |ility}}}|.Logging|
|000002e0| 20 6f 70 74 69 6f 6e 73 | 20 6f 74 68 65 72 20 74 | options| other t|
|000002f0| 68 61 6e 20 74 68 65 20 | 64 65 66 61 75 6c 74 73 |han the |defaults|
|00000300| 20 63 61 6e 20 62 65 20 | 73 65 74 20 62 79 20 65 | can be |set by e|
|00000310| 78 70 6c 69 63 69 74 6c | 79 20 6f 70 65 6e 69 6e |xplicitl|y openin|
|00000320| 67 0a 74 68 65 20 6c 6f | 67 20 66 69 6c 65 20 77 |g.the lo|g file w|
|00000330| 69 74 68 20 5c 63 6f 64 | 65 7b 6f 70 65 6e 6c 6f |ith \cod|e{openlo|
|00000340| 67 28 29 7d 20 70 72 69 | 6f 72 20 74 6f 20 63 61 |g()} pri|or to ca|
|00000350| 6c 6c 69 6e 67 20 5c 63 | 6f 64 65 7b 73 79 73 6c |lling \c|ode{sysl|
|00000360| 6f 67 28 29 7d 2e 0a 54 | 68 65 20 64 65 66 61 75 |og()}..T|he defau|
|00000370| 6c 74 73 20 61 72 65 20 | 28 75 73 75 61 6c 6c 79 |lts are |(usually|
|00000380| 29 20 5c 76 61 72 7b 69 | 64 65 6e 74 7d 20 3d 20 |) \var{i|dent} = |
|00000390| 5c 73 61 6d 70 7b 73 79 | 73 6c 6f 67 7d 2c 20 5c |\samp{sy|slog}, \|
|000003a0| 76 61 72 7b 6c 6f 67 6f | 70 74 7d 20 3d 20 30 2c |var{logo|pt} = 0,|
|000003b0| 0a 5c 76 61 72 7b 66 61 | 63 69 6c 69 74 79 7d 20 |.\var{fa|cility} |
|000003c0| 3d 20 5c 63 6f 64 65 7b | 4c 4f 47 5f 55 53 45 52 |= \code{|LOG_USER|
|000003d0| 7d 2e 0a 54 68 65 20 5c | 76 61 72 7b 69 64 65 6e |}..The \|var{iden|
|000003e0| 74 7d 20 61 72 67 75 6d | 65 6e 74 20 69 73 20 61 |t} argum|ent is a|
|000003f0| 20 73 74 72 69 6e 67 20 | 77 68 69 63 68 20 69 73 | string |which is|
|00000400| 20 70 72 65 70 65 6e 64 | 65 64 20 74 6f 20 65 76 | prepend|ed to ev|
|00000410| 65 72 79 20 6d 65 73 73 | 61 67 65 2e 0a 54 68 65 |ery mess|age..The|
|00000420| 20 6f 70 74 69 6f 6e 61 | 6c 20 5c 76 61 72 7b 6c | optiona|l \var{l|
|00000430| 6f 67 6f 70 74 7d 20 61 | 72 67 75 6d 65 6e 74 20 |ogopt} a|rgument |
|00000440| 69 73 20 61 20 62 69 74 | 20 66 69 65 6c 64 20 2d |is a bit| field -|
|00000450| 20 73 65 65 20 62 65 6c | 6f 77 20 66 6f 72 20 70 | see bel|ow for p|
|00000460| 6f 73 73 69 62 6c 65 0a | 76 61 6c 75 65 73 20 74 |ossible.|values t|
|00000470| 6f 20 63 6f 6d 62 69 6e | 65 2e 0a 54 68 65 20 6f |o combin|e..The o|
|00000480| 70 74 69 6f 6e 61 6c 20 | 5c 76 61 72 7b 66 61 63 |ptional |\var{fac|
|00000490| 69 6c 69 74 79 7d 20 61 | 72 67 75 6d 65 6e 74 20 |ility} a|rgument |
|000004a0| 73 65 74 73 20 74 68 65 | 20 64 65 66 61 75 6c 74 |sets the| default|
|000004b0| 20 66 61 63 69 6c 69 74 | 79 20 66 6f 72 20 6d 65 | facilit|y for me|
|000004c0| 73 73 61 67 65 73 0a 77 | 68 69 63 68 20 64 6f 20 |ssages.w|hich do |
|000004d0| 6e 6f 74 20 68 61 76 65 | 20 61 20 66 61 63 69 6c |not have| a facil|
|000004e0| 69 74 79 20 65 78 70 6c | 69 63 69 74 6c 79 20 65 |ity expl|icitly e|
|000004f0| 6e 63 6f 64 65 64 2e 0a | 5c 65 6e 64 7b 66 75 6e |ncoded..|\end{fun|
|00000500| 63 64 65 73 63 7d 0a 0a | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000510| 75 6e 63 64 65 73 63 7d | 7b 63 6c 6f 73 65 6c 6f |uncdesc}|{closelo|
|00000520| 67 7d 7b 7d 0a 43 6c 6f | 73 65 20 74 68 65 20 6c |g}{}.Clo|se the l|
|00000530| 6f 67 20 66 69 6c 65 2e | 0a 5c 65 6e 64 7b 66 75 |og file.|.\end{fu|
|00000540| 6e 63 64 65 73 63 7d 0a | 0a 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000550| 66 75 6e 63 64 65 73 63 | 7d 7b 73 65 74 6c 6f 67 |funcdesc|}{setlog|
|00000560| 6d 61 73 6b 7d 7b 6d 61 | 73 6b 70 72 69 7d 0a 54 |mask}{ma|skpri}.T|
|00000570| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 73 65 74 |his func|tion set|
|00000580| 20 74 68 65 20 70 72 69 | 6f 72 69 74 79 20 6d 61 | the pri|ority ma|
|00000590| 73 6b 20 74 6f 20 5c 76 | 61 72 7b 6d 61 73 6b 70 |sk to \v|ar{maskp|
|000005a0| 72 69 7d 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |ri} and |returns |
|000005b0| 74 68 65 0a 70 72 65 76 | 69 6f 75 73 20 6d 61 73 |the.prev|ious mas|
|000005c0| 6b 20 76 61 6c 75 65 2e | 0a 43 61 6c 6c 73 20 74 |k value.|.Calls t|
|000005d0| 6f 20 5c 63 6f 64 65 7b | 73 79 73 6c 6f 67 7d 20 |o \code{|syslog} |
|000005e0| 77 69 74 68 20 61 20 70 | 72 69 6f 72 69 74 79 20 |with a p|riority |
|000005f0| 6c 65 76 65 6c 20 6e 6f | 74 20 73 65 74 20 69 6e |level no|t set in|
|00000600| 20 5c 76 61 72 7b 6d 61 | 73 6b 70 72 69 7d 0a 61 | \var{ma|skpri}.a|
|00000610| 72 65 20 69 67 6e 6f 72 | 65 64 2e 0a 54 68 65 20 |re ignor|ed..The |
|00000620| 64 65 66 61 75 6c 74 20 | 69 73 20 74 6f 20 6c 6f |default |is to lo|
|00000630| 67 20 61 6c 6c 20 70 72 | 69 6f 72 69 74 69 65 73 |g all pr|iorities|
|00000640| 2e 0a 54 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 5c |..The fu|nction \|
|00000650| 63 6f 64 65 7b 4c 4f 47 | 5f 4d 41 53 4b 28 5c 76 |code{LOG|_MASK(\v|
|00000660| 61 72 7b 70 72 69 7d 29 | 7d 20 63 61 6c 63 75 6c |ar{pri})|} calcul|
|00000670| 61 74 65 73 20 74 68 65 | 20 6d 61 73 6b 20 66 6f |ates the| mask fo|
|00000680| 72 20 74 68 65 0a 69 6e | 64 69 76 69 64 75 61 6c |r the.in|dividual|
|00000690| 20 70 72 69 6f 72 69 74 | 79 20 5c 76 61 72 7b 70 | priorit|y \var{p|
|000006a0| 72 69 7d 2e 0a 54 68 65 | 20 66 75 6e 63 74 69 6f |ri}..The| functio|
|000006b0| 6e 20 5c 63 6f 64 65 7b | 4c 4f 47 5f 55 50 54 4f |n \code{|LOG_UPTO|
|000006c0| 28 5c 76 61 72 7b 70 72 | 69 7d 29 7d 20 63 61 6c |(\var{pr|i})} cal|
|000006d0| 63 75 6c 61 74 65 73 20 | 74 68 65 20 6d 61 73 6b |culates |the mask|
|000006e0| 20 66 6f 72 20 61 6c 6c | 20 70 72 69 6f 72 69 74 | for all| priorit|
|000006f0| 69 65 73 0a 75 70 20 74 | 6f 20 61 6e 64 20 69 6e |ies.up t|o and in|
|00000700| 63 6c 75 64 69 6e 67 20 | 5c 76 61 72 7b 70 72 69 |cluding |\var{pri|
|00000710| 7d 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |}..\end{|funcdesc|
|00000720| 7d 0a 0a 54 68 65 20 6d | 6f 64 75 6c 65 20 64 65 |}..The m|odule de|
|00000730| 66 69 6e 65 73 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |fines th|e follow|
|00000740| 69 6e 67 20 63 6f 6e 73 | 74 61 6e 74 73 3a 0a 0a |ing cons|tants:..|
|00000750| 5c 62 65 67 69 6e 7b 64 | 65 73 63 72 69 70 74 69 |\begin{d|escripti|
|00000760| 6f 6e 7d 0a 0a 5c 69 74 | 65 6d 5b 50 72 69 6f 72 |on}..\it|em[Prior|
|00000770| 69 74 79 20 6c 65 76 65 | 6c 73 20 28 68 69 67 68 |ity leve|ls (high|
|00000780| 20 74 6f 20 6c 6f 77 29 | 3a 5d 0a 0a 5c 63 6f 64 | to low)|:]..\cod|
|00000790| 65 7b 4c 4f 47 5f 45 4d | 45 52 47 7d 2c 20 5c 63 |e{LOG_EM|ERG}, \c|
|000007a0| 6f 64 65 7b 4c 4f 47 5f | 41 4c 45 52 54 7d 2c 20 |ode{LOG_|ALERT}, |
|000007b0| 5c 63 6f 64 65 7b 4c 4f | 47 5f 43 52 49 54 7d 2c |\code{LO|G_CRIT},|
|000007c0| 20 5c 63 6f 64 65 7b 4c | 4f 47 5f 45 52 52 7d 2c | \code{L|OG_ERR},|
|000007d0| 0a 5c 63 6f 64 65 7b 4c | 4f 47 5f 57 41 52 4e 49 |.\code{L|OG_WARNI|
|000007e0| 4e 47 7d 2c 20 5c 63 6f | 64 65 7b 4c 4f 47 5f 4e |NG}, \co|de{LOG_N|
|000007f0| 4f 54 49 43 45 7d 2c 20 | 5c 63 6f 64 65 7b 4c 4f |OTICE}, |\code{LO|
|00000800| 47 5f 49 4e 46 4f 7d 2c | 20 5c 63 6f 64 65 7b 4c |G_INFO},| \code{L|
|00000810| 4f 47 5f 44 45 42 55 47 | 7d 2e 0a 0a 5c 69 74 65 |OG_DEBUG|}...\ite|
|00000820| 6d 5b 46 61 63 69 6c 69 | 74 69 65 73 3a 5d 0a 0a |m[Facili|ties:]..|
|00000830| 5c 63 6f 64 65 7b 4c 4f | 47 5f 4b 45 52 4e 7d 2c |\code{LO|G_KERN},|
|00000840| 20 5c 63 6f 64 65 7b 4c | 4f 47 5f 55 53 45 52 7d | \code{L|OG_USER}|
|00000850| 2c 20 5c 63 6f 64 65 7b | 4c 4f 47 5f 4d 41 49 4c |, \code{|LOG_MAIL|
|00000860| 7d 2c 20 5c 63 6f 64 65 | 7b 4c 4f 47 5f 44 41 45 |}, \code|{LOG_DAE|
|00000870| 4d 4f 4e 7d 2c 0a 5c 63 | 6f 64 65 7b 4c 4f 47 5f |MON},.\c|ode{LOG_|
|00000880| 41 55 54 48 7d 2c 20 5c | 63 6f 64 65 7b 4c 4f 47 |AUTH}, \|code{LOG|
|00000890| 5f 4c 50 52 7d 2c 20 5c | 63 6f 64 65 7b 4c 4f 47 |_LPR}, \|code{LOG|
|000008a0| 5f 4e 45 57 53 7d 2c 20 | 5c 63 6f 64 65 7b 4c 4f |_NEWS}, |\code{LO|
|000008b0| 47 5f 55 55 43 50 7d 2c | 0a 5c 63 6f 64 65 7b 4c |G_UUCP},|.\code{L|
|000008c0| 4f 47 5f 43 52 4f 4e 7d | 20 61 6e 64 20 5c 63 6f |OG_CRON}| and \co|
|000008d0| 64 65 7b 4c 4f 47 5f 4c | 4f 43 41 4c 30 7d 20 74 |de{LOG_L|OCAL0} t|
|000008e0| 6f 20 5c 63 6f 64 65 7b | 4c 4f 47 5f 4c 4f 43 41 |o \code{|LOG_LOCA|
|000008f0| 4c 37 7d 2e 0a 0a 5c 69 | 74 65 6d 5b 4c 6f 67 20 |L7}...\i|tem[Log |
|00000900| 6f 70 74 69 6f 6e 73 3a | 5d 0a 0a 5c 63 6f 64 65 |options:|]..\code|
|00000910| 7b 4c 4f 47 5f 50 49 44 | 7d 2c 20 5c 63 6f 64 65 |{LOG_PID|}, \code|
|00000920| 7b 4c 4f 47 5f 43 4f 4e | 53 7d 2c 20 5c 63 6f 64 |{LOG_CON|S}, \cod|
|00000930| 65 7b 4c 4f 47 5f 4e 44 | 45 4c 41 59 7d 2c 20 5c |e{LOG_ND|ELAY}, \|
|00000940| 63 6f 64 65 7b 4c 4f 47 | 5f 4e 4f 57 41 49 54 7d |code{LOG|_NOWAIT}|
|00000950| 0a 61 6e 64 20 5c 63 6f | 64 65 7b 4c 4f 47 5f 50 |.and \co|de{LOG_P|
|00000960| 45 52 52 4f 52 7d 20 69 | 66 20 64 65 66 69 6e 65 |ERROR} i|f define|
|00000970| 64 20 69 6e 20 5c 66 69 | 6c 65 7b 73 79 73 6c 6f |d in \fi|le{syslo|
|00000980| 67 2e 68 7d 2e 0a 0a 5c | 65 6e 64 7b 64 65 73 63 |g.h}...\|end{desc|
|00000990| 72 69 70 74 69 6f 6e 7d | 0a |ription}|. |
+--------+-------------------------+-------------------------+--------+--------+