免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1605 | 回复: 3
打印 上一主题 下一主题

我这里没有unix的环境没有办法看帮助谁帮我发下logger的用法谢谢 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-08-23 13:39 |只看该作者 |倒序浏览
我这里没有unix的环境,没有办法看帮助,谁帮我发下logger的用法,谢谢了

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2005-08-23 13:46 |只看该作者

我这里没有unix的环境没有办法看帮助谁帮我发下logger的用法谢谢

LOGGER(1)                 BSD General Commands Manual                LOGGER(1)
                                                                                                                              
NAME
     logger - a shell command interface to the syslog(3) system log module
                                                                                                                              
SYNOPSIS
     logger [-isd] [-f file] [-p pri] [-t tag] [-u socket] [message ...]
                                                                                                                              
DESCRIPTION
     Logger makes entries in the system log.  It provides a shell command
     interface to the syslog(3) system log module.
                                                                                                                              
     Options:
                                                                                                                              
     -i       Log the process id of the logger process with each line.
                                                                                                                              
     -s       Log the message to standard error, as well as the system log.
                                                                                                                              
     -f file  Log the specified file.
                                                                                                                              
     -p pri   Enter the message with the specified priority.  The priority may
              be specified numerically or as a ``facility.level'' pair.  For
              example, ``-p local3.info'' logs the message(s) as informational
              level in the local3 facility.  The default is ``user.notice.''

     -t tag   Mark every line in the log with the specified tag.

     -u sock  Write to socket as specified with socket instead of builtin sys-
              log routines.

     -d       Use a datagram instead of a stream connection to this socket.

     --       End the argument list. This is to allow the message to start
              with a hyphen (-).

     message  Write the message to log; if not specified, and the -f flag is
              not provided, standard input is logged.

     The logger utility exits 0 on success, and >0 if an error occurs.

     Valid facility names are: auth, authpriv (for security information of a

     sensitive nature), cron, daemon, ftp, kern, lpr, mail, news, security
     (deprecated synonym for auth), syslog, user, uucp, and local0 to local7,
     inclusive.

     Valid level names are): alert, crit, debug, emerg, err, error (deprecated
     synonym for err), info, notice, panic (deprecated synonym for emerg),
     warning, warn (deprecated synonym for warning).  For the priority order
     and intended purposes of these levels, see syslog(3).

EXAMPLES
           logger System rebooted

           logger -p local0.notice -t HOSTIDM -f /dev/idmc

SEE ALSO
     syslog(3), syslogd(

STANDARDS
     The logger command is expected to be IEEE Std 1003.2 (``POSIX.2'') com-
     patible.

4.3 Berkeley Distribution        June 6, 1993        4.3 Berkeley Distribution

论坛徽章:
0
3 [报告]
发表于 2005-08-23 14:00 |只看该作者

我这里没有unix的环境没有办法看帮助谁帮我发下logger的用法谢谢

谢谢,还有个问题,如果我想把这个LOG文件写道两个文件里面,如何实现呢?谢谢了。

论坛徽章:
0
4 [报告]
发表于 2006-01-24 10:34 |只看该作者
修改syslog.conf.定义两个入口.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP