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
SEE ALSO
syslog(3), syslogd(8)
STANDARDS
The logger command is expected to be St -p1003.2 compatible.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-1003725/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 15 Practical Grep Command Examples In Linux / UNIXLinux
- linux commandLinux
- Linux find commandLinux
- Oracle Linux xargs CommandOracleLinux
- linux find command studyLinux
- Linux:-bash: tree: command not foundLinux
- Linux:-bash: unzip: command not foundLinux
- Linux Command常用匯總Linux
- 基於 logger sdk-logger 封裝封裝
- Unix, Linux 和MacOSLinuxMac
- LINUX UNIX建立組Linux
- linux/unix find命令Linux
- Linux/Unix Errno CodeLinux
- 【Linux】git note -v command not foundLinuxGit
- Linux 與 Unix 之差異Linux
- fstatat()函式 Unix/Linux函式Linux
- linux/unix命令參考Linux
- Linux和UNIX監控Linux
- Linux/Unix筆記本Linux筆記
- linux/unix 掃描埠Linux
- 何為linux or unix posixLinux
- 【linux報錯】-bash: xhost: command not foundLinux
- 【UNIX】DBA常用的linux命令Linux
- Unix/Linux 常用監控命令Linux
- Linux/UNIX命令dd簡介Linux
- Linux/UNIX套接字連線Linux
- linux/unix 批量改檔名Linux
- linux/unix dd命令詳解Linux
- linux/unix crontab命令詳解Linux
- linux/unix uname命令詳解Linux
- linux/unix ulimit命令詳解LinuxMIT
- Basic LINUX/UNIX Commands(轉)Linux
- 實用Unix/Linux 命令(轉)Linux
- Unix、Linux、GNU 關係梳理Linux
- redhat linux之/etc/syslog.conf示例及loggerRedhatLinux
- Flutter中的LoggerFlutter
- Unix/Linux提權漏洞快速檢測工具unix-privesc-checkLinux
- [書呆子]像Unix那樣去生活——《LInux/Unix設計思想》Linux