免费注册 查看新帖 |

Chinaunix

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

Linux / Unix Command: logger [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-13 09:34 |只看该作者 |倒序浏览
Linux / Unix Command: logger
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 info rmational 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 syslog 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
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/72217/showart_1129464.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP