2 .\" # Copyright (c) 2015, Juniper Networks, Inc.
3 .\" # All rights reserved.
4 .\" # This SOFTWARE is licensed under the LICENSE provided in the
5 .\" # ../Copyright file. By downloading, installing, copying, or
6 .\" # using the SOFTWARE, you agree to be bound by the terms of that
8 .\" # Phil Shafer, July 2015
14 .Nm xo_syslog , xo_vsyslog , xo_open_log , xo_close_log , xo_set_logmask
15 .Nd create SYSLOG (RFC5424) log records using libxo formatting
21 .Fn xo_syslog "int pri" "const char *name" "const char *fmt" "..."
23 .Fn xo_vsyslog "int pri" "const char *name" "const char *fmt" "va_list vap"
25 .Fn xo_close_log "void"
27 .Fn xo_open_log "const char *ident" "int logstat" "int logfac"
29 .Fn xo_set_logmask "int pmask"
33 function creates log entries following the standard defined in
35 These messages are sent to the log
37 daemon, where they can be filtered, forwarded, and archived.
39 format strings are used to create both the message text and the
41 content, containing name/value pairs that can be parsed by suitable
46 for basic information about formatting strings.
48 encodes all value fields at SD-PARAMS within the syslog message.
49 An exception is made for fields with the "{d:}" modifier; such fields
50 appear in the message text only, with fields with the "{e:}" modifier
51 appear as SD-PARAMS, but not in the message text.
56 for additional flexibility.
59 .Fn xo_close_log , and
61 are all analogous to their libs counterparts,
65 The extra underscores in the names are unfortunate, but keep
70 .Bd -literal -offset indent
71 xo_syslog(LOG_LOCAL4 | LOG_NOTICE, "ID47",
72 "{e:iut/%u}An {:event-source} {:event-id/%u} log entry",
77 .Xr xo_set_syslog_enterprise_id 3 ,
83 library first appeared in
88 .An Phil Shafer Aq Mt phil@freebsd.org .