This is the cl-syslog Reference Manual, version 0.2.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:26:12 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-syslog
Common Lisp syslog interface.
Erik Enge, Mike Maul, Robert Smith
MIT (See LICENSE)
0.2.4
alexandria
(system).
cffi
(system).
global-vars
(system).
usocket
(system).
split-sequence
(system).
babel
(system).
local-time
(system).
sb-posix
(system).
package.lisp
(file).
variable.lisp
(file).
cl-syslog.lisp
(file).
rfc5424.lisp
(file).
rfc5424-reserved.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-syslog/cl-syslog.asd
cl-syslog/package.lisp
cl-syslog/variable.lisp
cl-syslog/cl-syslog.lisp
cl-syslog/rfc5424.lisp
cl-syslog/rfc5424-reserved.lisp
cl-syslog/variable.lisp
cl-syslog
(system).
+log-cons+
(constant).
+log-ndelay+
(constant).
+log-nowait+
(constant).
+log-odelay+
(constant).
+log-perror+
(constant).
+log-pid+
(constant).
*facilities*
(special variable).
*priorities*
(special variable).
cl-syslog/cl-syslog.lisp
cl-syslog
(system).
closelog
(function).
get-facility
(function).
get-priority
(function).
invalid-facility
(condition).
invalid-priority
(condition).
log
(function).
openlog
(function).
syslog
(macro).
cl-syslog/rfc5424.lisp
cl-syslog
(system).
current-time
(generic function).
define-structured-data-id
(macro).
format-log
(generic function).
join-log-writers
(function).
malformed-rfc5424-input
(condition).
null-log-writer
(function).
rfc-log
(macro).
rfc5424-logger
(class).
shared-initialize
(method).
stream-log-writer
(function).
syslog-log-writer
(function).
tee-to-stream
(function).
udp-log-writer
(function).
ascii-char-p
(function).
ascii-control-char-p
(function).
ascii-graphic-char-p
(function).
ascii-graphic-string-p
(function).
ascii-whitespace-char-p
(function).
assert-rfc5424
(macro).
copy-structured-data-description
(function).
copy-structured-data-field-description
(function).
find-sd-id
(function).
(setf find-sd-id)
(function).
logger-app-name
(reader method).
logger-facility
(reader method).
logger-hostname
(reader method).
logger-log-writer
(reader method).
logger-maximum-priority
(reader method).
logger-process-id
(reader method).
make-param
(function).
make-sd-element
(function).
make-structured-data-description
(function).
make-structured-data-field-description
(function).
nilvalue
(constant).
param-name
(function).
param-value
(function).
rfc5424-pri
(type).
sd-element-id
(function).
sd-element-params
(function).
structured-data-description
(structure).
structured-data-description-allow-other-params
(reader).
structured-data-description-fields
(reader).
structured-data-description-id
(reader).
structured-data-description-p
(function).
structured-data-field-description
(structure).
structured-data-field-description-length-type
(reader).
structured-data-field-description-name
(reader).
structured-data-field-description-p
(function).
structured-data-field-description-repetitions-allowed-p
(reader).
structured-data-field-description-validator
(reader).
valid-app-name-p
(function).
valid-day-p
(function).
valid-enterprise-number-p
(function).
valid-fraction-of-a-second-p
(function).
valid-hostname-p
(function).
valid-hour-p
(function).
valid-minute-p
(function).
valid-month-p
(function).
valid-msgid-p
(function).
valid-param-p
(function).
valid-pri-p
(function).
valid-procid-p
(function).
valid-sd-element-p
(function).
valid-sd-id-p
(function).
valid-sd-name-p
(function).
valid-second-p
(function).
valid-year-p
(function).
violated-assertion
(reader method).
write-app-name
(function).
write-date
(function).
write-hostname
(function).
write-msg
(function).
write-msgid
(function).
write-param-name
(function).
write-param-value
(function).
write-pri
(function).
write-procid
(function).
write-rfc5424-syslog-message
(function).
write-rfc5424-syslog-message-unsafe
(function).
write-sd-element
(function).
write-sd-elements
(function).
write-time
(function).
write-two-digit-number
(function).
write-utc-timestamp
(function).
write-version
(function).
cl-syslog/rfc5424-reserved.lisp
cl-syslog
(system).
ip-address-p
(function).
ip4-address-p
(function).
ip6-address-p
(function).
Packages are listed by definition order.
cl-syslog
Common Lisp interface to syslog.
syslog
common-lisp
.
+log-cons+
(constant).
+log-ndelay+
(constant).
+log-nowait+
(constant).
+log-odelay+
(constant).
+log-perror+
(constant).
+log-pid+
(constant).
closelog
(function).
current-time
(generic function).
define-structured-data-id
(macro).
format-log
(generic function).
get-facility
(function).
get-priority
(function).
invalid-facility
(condition).
invalid-priority
(condition).
join-log-writers
(function).
log
(function).
malformed-rfc5424-input
(condition).
null-log-writer
(function).
openlog
(function).
rfc-log
(macro).
rfc5424-logger
(class).
stream-log-writer
(function).
syslog
(macro).
syslog-log-writer
(function).
tee-to-stream
(function).
udp-log-writer
(function).
*facilities*
(special variable).
*priorities*
(special variable).
ascii-char-p
(function).
ascii-control-char-p
(function).
ascii-graphic-char-p
(function).
ascii-graphic-string-p
(function).
ascii-whitespace-char-p
(function).
assert-rfc5424
(macro).
copy-structured-data-description
(function).
copy-structured-data-field-description
(function).
facility
(generic reader).
find-sd-id
(function).
(setf find-sd-id)
(function).
ip-address-p
(function).
ip4-address-p
(function).
ip6-address-p
(function).
logger-app-name
(generic reader).
logger-facility
(generic reader).
logger-hostname
(generic reader).
logger-log-writer
(generic reader).
logger-maximum-priority
(generic reader).
logger-process-id
(generic reader).
make-param
(function).
make-sd-element
(function).
make-structured-data-description
(function).
make-structured-data-field-description
(function).
nilvalue
(constant).
param-name
(function).
param-value
(function).
priority
(generic reader).
rfc5424-pri
(type).
sd-element-id
(function).
sd-element-params
(function).
structured-data-description
(structure).
structured-data-description-allow-other-params
(reader).
structured-data-description-fields
(reader).
structured-data-description-id
(reader).
structured-data-description-p
(function).
structured-data-field-description
(structure).
structured-data-field-description-length-type
(reader).
structured-data-field-description-name
(reader).
structured-data-field-description-p
(function).
structured-data-field-description-repetitions-allowed-p
(reader).
structured-data-field-description-validator
(reader).
valid-app-name-p
(function).
valid-day-p
(function).
valid-enterprise-number-p
(function).
valid-fraction-of-a-second-p
(function).
valid-hostname-p
(function).
valid-hour-p
(function).
valid-minute-p
(function).
valid-month-p
(function).
valid-msgid-p
(function).
valid-param-p
(function).
valid-pri-p
(function).
valid-procid-p
(function).
valid-sd-element-p
(function).
valid-sd-id-p
(function).
valid-sd-name-p
(function).
valid-second-p
(function).
valid-year-p
(function).
violated-assertion
(generic reader).
write-app-name
(function).
write-date
(function).
write-hostname
(function).
write-msg
(function).
write-msgid
(function).
write-param-name
(function).
write-param-value
(function).
write-pri
(function).
write-procid
(function).
write-rfc5424-syslog-message
(function).
write-rfc5424-syslog-message-unsafe
(function).
write-sd-element
(function).
write-sd-elements
(function).
write-time
(function).
write-two-digit-number
(function).
write-utc-timestamp
(function).
write-version
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Log on the console if errors in sending.
Don’t delay open.
Don’t wait for console forks: deprecated.
Delay open until first syslog() (default).
Log to stderr as well.
Log the pid with each message.
Define a new structured data ID named ID-NAME.
ALLOW-OTHER-PARAMS is an option to allow other named parameters to be present.
STANDARD is an option to dictate that the defined message is an IETF-reserved name.
BODY specifies the fields and has the following syntax:
<body> ::= <field>*
<field> ::= <symbol>
| (<symbol> [:allow-repetitions <boolean>]
[:length <length-type>]
[:validator <form>])
<length-type> ::= an unevaluated form that is a subtype of UNSIGNED-BYTE
<form> ::= an evaluated form producing a funcallable unary function mapping to booleans
The :ALLOW-REPETITIONS keyword allows a field to be repeated (default: nil).
The :LENGTH keyword specifies what the length of the string data must satisfy. By default it’s unbounded by UNSIGNED-BYTE.
The :VALIDATOR keyword allows a validating function to be provided. By default it is (CONSTANTLY T).
Log the message formed by CONTROL and ARGS to the logger LOGGER with priority PRIORITY. Structured data should be a list of structured data clauses of the form, where each clause has the form:
(:MSGID <string>)
or
(<ID> <PARAM 1> <VALUE 1>
<PARAM 2> <VALUE 2>
...)
The data <ID> and <PARAM n> are symbols, while <VALUE n> are strings. Both <ID> and <PARAM n> are *not* evaluated, while <VALUE n> are evaluated.
If :MSGID is provided, then this will be the RFC5424 msgid of the log message.
The logging will only happen of LOGGER does not exceed a specified maximum priority value.
Return facility number given the facility’s name. If there is no such facility, signal ‘invalid-facility’ error.
Return priority number given the priority’s name. If there is no such priority, signal ‘invalid-priority’ error.
Create a new log writer (for an RFC5424-LOGGER instance) joining the effects of each of the supplied log writers WRITERS.
Print message to syslog.
’option’ can be any of the +log...+ constants
Create a log writer (for an RFC5424-LOGGER instance) that does nothing.
Create a log function (for an RFC5424-LOGGER instance) that writes to STREAM. By default this is *STANDARD-OUTPUT*.
Create a log writer (for an RFC5424-LOGGER instance) that writes to the system’s syslog.
Create a log writer (for an RFC5424-LOGGER instance) that writes to STREAM, but is also processed by LOG-WRITER.
Create a log writer (for an RFC5424-LOGGER instance) that writes to the UDP endpoint HOST on poort PORT.
Return values YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, FRACTION-OF-A-SECOND.
rfc5424-logger
)) ¶Log the simple message STRING according to the priority PRIORITY. Note that this function behaves like CL:FORMAT, so ~’s in the CONTROL string will be interpreted as such.
This should be used in the simplest of logging situations. For more complicated log messages that contain structured data, see the RFC-LOG macro.
rfc5424-logger
) priority control &rest args) ¶error
.
error
.
error
.
:violated-assertion
This slot is read-only.
Class holding the state to construct and transmit an RFC 5424-compliant log message.
Initarg | Value |
---|---|
:facility | (quote user) |
:maximum-priority | (quote info) |
:hostname | (machine-instance) |
:app-name | nil |
:process-id | (prin1-to-string (getpid)) |
:log-writer | nil |
The syslog facility, as a keyword.
:facility
This slot is read-only.
The maximum priority above which log messages are not emitted to the external logging facility. The default maximum priority is :INFO. (Recall that priorities of *increasing* severity have *decreasing* priority values.)
:maximum-priority
This slot is read-only.
:hostname
This slot is read-only.
:app-name
This slot is read-only.
:process-id
This slot is read-only.
A binary function that takes a priority keyword and a string and returns an unspecified value. This is the function that received log messages and does whatever is desired. A NIL initarg (the default) means strings will be logged to syslog with the associated facility (as if by SYSLOG-LOG-WRITER).
Example: A value of (CONSTANTLY NIL) is appropriate if no action is desired.
Example: A value akin to (lambda (p s) (write-line s)) is appropriate if all log messages should go to *STANDARD-OUTPUT*. Note that this can be done with (STREAM-LOG-WRITER).
Note: This isn’t a "writer" in the usual CLOS sense.
See also: The functions NULL-LOG-WRITER, SYSLOG-LOG-WRITER, STREAM-LOG-WRITER, TEE-TO-STREAM, UDP-LOG-WRITER.
:log-writer
This slot is read-only.
Is the string STRING a valid enterprise number?
Is X a valid structured data ID? Roughly, these are either:
1. A bare ASCII name, in which case it’s an IETF-reserved name.
2. An ASCII name, followed by ’@’, followed by a number (which may have dots).
Return two values:
1. A Boolean indicating whether it’s a valid ID.
2. A Boolean indicating whether its name conforms to an IETF-reserved name.
Write out the PARAM-NAME STRING to the stream STREAM.
Write out the PARAM-VALUE STRING to the stream STREAM.
Write the RFC 5424-compliant syslog message to the stream STREAM.
invalid-facility
)) ¶rfc5424-logger
)) ¶automatically generated reader method
rfc5424-logger
)) ¶The syslog facility, as a keyword.
rfc5424-logger
)) ¶automatically generated reader method
rfc5424-logger
)) ¶A binary function that takes a priority keyword and a string and returns an unspecified value. This is the function that received log messages and does whatever is desired. A NIL initarg (the default) means strings will be logged to syslog with the associated facility (as if by SYSLOG-LOG-WRITER).
Example: A value of (CONSTANTLY NIL) is appropriate if no action is desired.
Example: A value akin to (lambda (p s) (write-line s)) is appropriate if all log messages should go to *STANDARD-OUTPUT*. Note that this can be done with (STREAM-LOG-WRITER).
Note: This isn’t a "writer" in the usual CLOS sense.
See also: The functions NULL-LOG-WRITER, SYSLOG-LOG-WRITER, STREAM-LOG-WRITER, TEE-TO-STREAM, UDP-LOG-WRITER.
rfc5424-logger
)) ¶The maximum priority above which log messages are not emitted to the external logging facility. The default maximum priority is :INFO. (Recall that priorities of *increasing* severity have *decreasing* priority values.)
rfc5424-logger
)) ¶automatically generated reader method
invalid-priority
)) ¶malformed-rfc5424-input
)) ¶A description of structured data.
structure-object
.
alexandria:string-designator
This slot is read-only.
boolean
t
This slot is read-only.
alexandria:proper-list
This slot is read-only.
A description of a field of structured data.
structure-object
.
alexandria:string-designator
This slot is read-only.
boolean
This slot is read-only.
(quote unsigned-byte)
This slot is read-only.
(or symbol function)
(constantly t)
This slot is read-only.
Jump to: | (
A C D F G I J L M N O P R S T U V W |
---|
Jump to: | (
A C D F G I J L M N O P R S T U V W |
---|
Jump to: | *
+
A C F H I L M N P R S V |
---|
Jump to: | *
+
A C F H I L M N P R S V |
---|
Jump to: | C F I M P R S T V |
---|
Jump to: | C F I M P R S T V |
---|