⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.html

📁 與 unix 上相似的syslog daemon, 沒有 log4j 複雜
💻 HTML
字号:
<html><head><title>Java SyslogD</title></head><body><h2>Introduction</h2>The configuration file, which is named 'syslog.conf',is a list of configuration<em>statements.</em> Each statement describes eithera <em>window</em> or an <em>action.</em><p>A syslog window statement is used to display a windowin which syslog messages will be displayed. The messagesthat are displayed in any given window are determined bythe action statements which contain the window's name.<p>The syslog.conf file that is included with this packagecontains help and examples in its comments.<h2>Comments</h2>Any lines which start with the character '#' are consideredto be comments and are completely ignored.<h2>Continuation</h2>Any lines which end with the character '\' are consideredto be continued on the next line.<h2>Window Statement</h2>Window statements are identified by their first characterbeing the at-sign '@'. The at-sign is followed <em>without</em>whitespace by the window's name. This name is the name thatis used in actions to reference the window. The windowstatement takes the following form:<pre>	@name class title bufNum x y w h [parameters...]</pre>The <em>name</em> is the name that is used in actionstatements to refer to this window.<p>The <em>class</em> is the classname of the Java classthat implements this window. The class must implementthe interface name<em>com.ice.syslogd.SyslogDisplayInterface.</em> Syslogdprovides a default window implementation that you canuse with the class 'STD'.<p>The <em>title</em> is the window's title.<p>The <em>bufNum</em> is the number of messages for thewindow to display. Some implementations may ignore thisvalue.<p>The <em>x y w h</em> fields specify the location of thewindow. The parameters are: x = x location of the topleft corner; y = y location of top left corner; w = thewidth of the window; h = the height of the window.<br>The <em>paramters</em> are the option parameters thatthe window implementation indicated by class expects.The 'STD' window class expects three parameters:<ol><li>Field list which determines which fields are displayed.<li>Initial window visibility, either 'hidden' or 'visible'.<li>Font used to display messages.</ol><p>Here is an example entry for the standard implementationthat defines a window named MAIN:<pre>	@MAIN STD "Main Window" \		250 350 30 600 300 * visible Monospaced-plain-12</pre>The statment creates a window which buffers 250 messages.The statment places the window at the location 350,30 andmakes the window 600 wide and 300 tall.The '*' in the fields list indicates <em>all fields.</em>The window is initially visible and displays using theMonospaced font, plain face, 12 point.<p>The <em>field list</em> is either an asterisk, indicating allfields, or it is a string which has upper and lower casecharacters indicating the fields to be displayed, and theirinitial visibility setting. If the character is uppercase,then it is visible, otherwise it is hiden.<p>Here are the characters:<ul><li><em>T</em> - The timestamp.<li><em>F</em> - The facility.<li><em>P</em> - The priority.<li><em>H</em> - The originating host name.<li><em>N</em> - The process name.<li><em>I</em> - The process id.<li><em>M</em> - The message itself.</ul><h3>LineDisplay</h3>Syslogd comes with an additional window implementationnamed 'com.ice.syslogd.LineDisplay'. This is designed todisplay just a single line with the last message received.Because of this, the bufNum parameter is ignored.<h3>Custom Display Implementation</h3>You may define your own windows. All they need to do isimplement the SyslogDisplayInterface interface, and thecompiled class must be in your CLASSPATH. Then simplyuse your class name as the <em>class</em> in the windowstatement.<h2>Action Statement</h2>Action lines are any line that is not a comment or awindow statement. Actions take the form:<pre>	facility.priority.action[/expr/] [parameters...]</pre>Where:<ul><li><em>Facility</em> is the faclity name, or '*' for all facilities.<li><em>Priority</em> is the minimum priority, or '*' for all priorities.<li><em>Action</em> is the action name.<li><em>Expr</em> is an optional regular expression that the message mustmatch before the action is taken.<li><em>Parameters</em> is a list of optional parameters that the actionunderstands.</ul><p>The <em>action</em> is one of the following, with theindicated parameters:<ul><li><strong>display</strong> name - Display the message inthe window named <em>name,</em> which must be defined by awindow statement.<li><strong>file</strong> filename - Append the message tothe file named <em>filename.</em><li><strong>system</strong> program args... - Exec the systemprogram named <em>program</em> with the arguments <em>args.</em><li><strong>forward</strong> host port - Forward the message tothe host named <em>host</em> on the port numbered <em>port.</em><li><strong>email</strong> host address subject -Email the message to <em>address</em> using the SMTP protocolvia the host named <em>host</em> giving the email theSubject of <em>subject.</em><li><strong>sound</strong> package filename -Play the sound in file <em>filename</em> using the sound packagenamed <em>package</em> (currently only 'SunAudio' is understood).</ul>Here are some examples:<pre>*.*.display MAIN*.*.file D:/syslog.all.txtmail.debug.sound/to=timepop/ \	SunAudio E:/tbomb/sounds/email.audaemon.notice.email/!msgid=/ \	mail.host.com user@domain.com \	"Syslog daemon.notice message."user.critical.forward support.host.com 514user.notice.system \	sh -c "echo This is a user notice | /usr/bin/wall"</pre><!-- ================ HOME PAGE ================== --><hr><a href="http://www.ice.com/java/syslogd/index.html">The SyslogD Home Page</a>will always contain the latest version of SyslogD foryour downloading pleasure.<hr><FONT SIZE="-2"><center>$Id: config.html,v 1.2 1998/07/29 02:15:11 time Exp $<br>Copyright (c) 1997 By Timothy Gerard Endres<br>SyslogD is licensed to you under the<a href="License.html">GNU General Public License</a>.</center></FONT></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -