]> www.wagner.pp.ru Git - sites/home_page.git/blob - software/tcl/tclsyslog.html
f18cd9635b2cd21af48474e2b51dbc4a6c15f7cd
[sites/home_page.git] / software / tcl / tclsyslog.html
1 <HTML><HEAD>
2 <TITLE>TclSyslog</TITLE>
3 <META NAME="description" CONTENT="Tcl extension to interface Unix syslog
4 facility">
5 </HEAD><BODY>
6 <H1> TclSyslog</H1>
7
8 I was highly surprised that <A HREF="http://tclx.sf.net/">TclX</A> package, which provides a lot of Unix-specific functionality
9 for Tcl doesn't provide interface to syslog. 
10 <P>
11 So, I've designed my own package.  
12 <p>
13 I've not touched this package since 2000. It just works.
14 </p>
15
16 <h2>Documentation</h2>
17 <P>
18 <PRE>
19   package require syslog
20   syslog ?options? priority mesage  
21 </PRE>
22 Syslog command logs message to system syslog facility. By default,
23 it uses syslog facility user and content of Tcl variable <B>argv0</B> as
24 identifier. It can be overriden by options of syslog command. Options 
25 available
26 <DL>
27 <DT> -facility value
28 <DD> sets syslog facility to use. All values, defined in BSDI man page
29 syslog(3) are defined. On Solaris facility <b>authpriv</b> is same as
30 <b>auth</b>.
31 <DT> -ident string
32 <DD> sets id string to use.
33 <DT> -options value
34 <DD> set options to use in <B>openlog</B>(3) call. Options can be
35 specified as numeric constant or (2.1 only) as list of symbolic names. 
36 </DL>
37 If any of these options is used, syslog command closes and reopens log.
38 But openlog call is issued only on first call to syslog, so no overhead is
39 expected, when you are specifying desired facility and ident upon first
40 call to syslog. 
41 <P>
42 It is also possible to call syslog just with options, without priority and
43 message.
44 Facilities and priorities are spelled in lowercase letter same (hopefully)
45 way as in <CODE>/etc/syslog.conf</CODE> or <B>logger</B>(1) command line.
46 <P>
47 There are two version of this extension maintained - 1.x and 2.x. 1.x is
48 for old Tcl, which is not Unicode inside. They don't use stubs interface
49 and use string-based commmands.
50 <P>
51 2.x is Unicode-aware. It means that it is objectified, and it converts
52 messages and ident strings from Unicode to current system encoding
53 before sending them to library functions.
54 <H2>Download</H2>
55 <A HREF="http://ftp.45.free.net/pub/tcl/tclsyslog/tclsyslog-1.1.tar.gz">Version 1.1</A> For tcl 7.x and 8.0.x<BR>
56 <A HREF="http://ftp.45.free.net/pub/tcl/tclsyslog/tclsyslog-2.1.tar.gz">Version 2.1</A> For tcl 8.1 and above -
57 stubs-enabled and Unicode aware.
58 <A
59 HREF="http://ftp.45.free.net/pub/tcl/tclsyslog/tclsyslog-2.0.tar.gz">Version
60 2.0</A> For tcl 8.1 and above -
61 stubs-enabled and Unicode aware.
62 <H2>CVS access</H2>
63 TclSyslog can also be obtained from my CVS.
64
65 <pre>
66 CVSROOT=:pserver:cvs@45.free.net:/work/oss
67 cvs login
68 &lt; empty password&lt;
69 cvs checkout tclsyslog 
70 </pre>
71
72 You can also <a href="/cgi-bin/cvsweb/tclsyslog?cvsroot=soft">browse CVS
73 via web</A>
74 <p>
75 Use tag <a
76 href="/cgi-bin/cvsweb/tclsyslog?cvsroot=soft&only_with_tag=r-2-0-branch">r-2-0-branch</a> for version 2.x and 
77 <a href="/cgi-bin/cvsweb/tclsyslog?cvsroot=soft&only_with_tag=r-1-1-branch">r-1-1-branch</a>
78 for version 1.x.
79
80 <H2>Bug tracking system</H2>
81
82 Access to <A
83 HREF="https://www.45.free.net/cgi-bin/cvstrac/tclsyslog/">bug tracking
84 system</a> allowed only via https.
85 See <a href="http://www.45.free.net/cvstrac.html">my cvstrac page</a>
86 for instructions and <a
87 href="http://www.45.free.net/45.free.net.crt">certificate</a>.
88
89
90
91 </BODY>
92 </HTML>