其他设备也有自己的日志。uucp和news设备能产生许多外部消息。它把这些消息存到自己的日志(/var/log/spooler)中并把级别限为\"err\"或更高。例如:
# save mail and news errors of level err and higher in aspecial file.
uucp,news.crit /var/log/spooler
当一个紧急消息到来时,可能想让所有的用户都得到。也可能想让自己的日志接收并保存。
#everybody gets emergency messages, plus log them on anther machine
*.emerg *
*.emerg @linuxaid.com.cn
alert消息应该写到root和tiger的个人账号中:
#root and tiger get alert and higher messages
*.alert root,tiger
有时syslogd将产生大量的消息。例如内核(\"kern\"设备)可能很冗长。用户可能想把内核消息纪录到/dev/console中。下面的例子表明内核日志纪录被注释掉了:
#log all kernel messages to the console
#logging much else clutters up the screen
#kern.* /dev/console
用户可以在一行中指明所有的设备。下面的例子把info或更高级别的消息送到/var/log/messages,除了mail以外。级别\"none\"禁止一个设备:
#log anything(except mail)of level info or higher
#don\'t log private authentication messages!
*.info:mail.none;authpriv.none /var/log/messages
在有些情况下,可以把日志送到打印机,这样网络入侵者怎么修改日志都没有用了。通常要广泛纪录日志。syslog设备是一个攻击者的显著目标。一个为其他主机维护日志的系统对于防范服务器攻击特别脆弱,因此要特别注意。
有个小命令logger为syslog(3)系统日志文件提供一个shell命令接口,使用户能创建日志文件中的条目。用法:logger 例如:logger this is a test!
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器