syslog.3

来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3 代码 · 共 74 行

3
74
字号
.TH SYSLOG 3.\"	@(#)syslog.3	4.1		7/25/83.SH NAMEsyslog, openlog, closelog -- control system log.SH SYNOPSIS# include <syslog.h>.PPopenlog(ident, logstat).brchar *ident;.PPsyslog(priority, message, parameters ... ).brchar *message;.PPcloselog().SH DESCRIPTION.I Syslogarranges towrite the.I messageonto thesystem log maintained by.IR syslog (8).The message is tagged with.I priority.The message looks like a.I printf(3)string except that.B %mis replaced by the current error message(collected from.I errno\c).A trailing newline is added if needed.This message will be read by.I syslog(8)and output to the system console or files as appropriate..PPIf special processing is needed,.I openlogcan be called to initialize the log file.Parameters are.I identwhich is prepended to every message,and.I logstatwhich isa bit field indicating special status;current values are:.IP LOG_PID \w'LOG_PID'u+3log the process id with each message:useful for identifying instantiations of daemons..LP.I Openlogreturns zero on success.If it cannot open the file.I /dev/log,it writes on.I /dev/consoleinstead and returns -1..PP.I Closelogcan be used to close the log file..SH EXAMPLES.nfsyslog(LOG_SALERT, "who: internal error 23");openlog("serverftp", LOG_PID);syslog(LOG_INFO, "Connection from host %d", CallingHost);.fi.SH SEE\ ALSOsyslog(8)

⌨️ 快捷键说明

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