This is the verbose Reference Manual, version 2.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 07:03:51 2024 GMT+0.
verbose/verbose.asd
verbose/package.lisp
verbose/toolkit.lisp
verbose/controller.lisp
verbose/message.lisp
verbose/pipes.lisp
verbose/convenience.lisp
verbose/conditions.lisp
verbose/muffling.lisp
verbose/sync-request.lisp
verbose/documentation.lisp
The main system appears first, followed by any subsystem dependency.
verbose
A logging framework using the piping library.
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/verbose.git)
zlib
2.1.0
piping
(system).
local-time
(system).
bordeaux-threads
(system).
dissect
(system).
documentation-utils
(system).
package.lisp
(file).
toolkit.lisp
(file).
controller.lisp
(file).
message.lisp
(file).
pipes.lisp
(file).
convenience.lisp
(file).
conditions.lisp
(file).
muffling.lisp
(file).
sync-request.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
verbose/verbose.asd
verbose/package.lisp
verbose/toolkit.lisp
verbose/controller.lisp
verbose/message.lisp
verbose/pipes.lisp
verbose/convenience.lisp
verbose/conditions.lisp
verbose/muffling.lisp
verbose/sync-request.lisp
verbose/documentation.lisp
verbose/toolkit.lisp
package.lisp
(file).
verbose
(system).
verbose/controller.lisp
toolkit.lisp
(file).
verbose
(system).
*global-controller*
(special variable).
*process-locally*
(special variable).
controller
(class).
controller-loop
(method).
initialize-instance
(method).
pass
(method).
print-object
(method).
queue
(reader method).
(setf queue)
(writer method).
queue-back
(reader method).
(setf queue-back)
(writer method).
queue-condition
(reader method).
queue-lock
(reader method).
start
(method).
stop
(method).
thread
(reader method).
(setf thread)
(writer method).
thread-continue
(reader method).
(setf thread-continue)
(writer method).
with-controller-lock
(macro).
verbose/message.lisp
controller.lisp
(file).
verbose
(system).
*default-message-class*
(special variable).
*levels*
(special variable).
*timestamp-format*
(special variable).
add-level
(function).
categories
(reader method).
(setf categories)
(writer method).
content
(reader method).
(setf content)
(writer method).
debug
(compiler macro).
debug
(function).
define-level
(macro).
error
(compiler macro).
error
(function).
fatal
(compiler macro).
fatal
(function).
format-message
(method).
format-message
(method).
format-message
(method).
format-message
(method).
info
(compiler macro).
info
(function).
initialize-instance
(method).
level
(reader method).
(setf level)
(writer method).
log
(method).
log
(method).
log
(method).
log
(method).
log-message
(function).
log-object
(function).
message
(class).
print-object
(method).
severe
(compiler macro).
severe
(function).
thread
(reader method).
(setf thread)
(writer method).
timestamp
(reader method).
(setf timestamp)
(writer method).
trace
(compiler macro).
trace
(function).
warn
(compiler macro).
warn
(function).
verbose/pipes.lisp
message.lisp
(file).
verbose
(system).
ansi-colors
(reader method).
(setf ansi-colors)
(writer method).
categories
(reader method).
(setf categories)
(writer method).
category-filter
(class).
category-tree-filter
(class).
file
(reader method).
(setf file)
(writer method).
file-faucet
(class).
format-message
(method).
format-message
(method).
format-message
(method).
format-message
(method).
initialize-instance
(method).
initialize-instance
(method).
initialize-instance
(method).
interval
(reader method).
(setf interval)
(writer method).
last-rotation
(reader method).
(setf last-rotation)
(writer method).
level
(reader method).
(setf level)
(writer method).
(setf level)
(method).
level-filter
(class).
matching-tree-category
(function).
output
(reader method).
(setf output)
(writer method).
pass
(method).
pass
(method).
pass
(method).
pass
(method).
pass
(method).
print-object
(method).
repl-faucet
(class).
rotate
(method).
rotating-file-faucet
(class).
stream-faucet
(class).
template
(reader method).
(setf template)
(writer method).
verbose/convenience.lisp
pipes.lisp
(file).
verbose
(system).
add-pipe
(function).
add-repl-category
(function).
define-pipe
(macro).
make-standard-global-controller
(function).
output-here
(function).
remove-global-controller
(function).
remove-repl-category
(function).
repl-categories
(function).
(setf repl-categories)
(function).
repl-level
(function).
(setf repl-level)
(function).
restart-global-controller
(function).
verbose/conditions.lisp
convenience.lisp
(file).
verbose
(system).
condition-message
(class).
log
(method).
message-condition
(reader method).
(setf message-condition)
(writer method).
*verbose-conditions*
(special variable).
verbose/muffling.lisp
conditions.lisp
(file).
verbose
(system).
*muffled-categories*
(special variable).
pass
(method).
with-muffled-logging
(macro).
verbose/sync-request.lisp
muffling.lisp
(file).
verbose
(system).
pass
(method).
sync
(function).
sync-request
(structure).
sync-request-condition
(reader).
(setf sync-request-condition)
(writer).
sync-request-lock
(reader).
(setf sync-request-lock)
(writer).
copy-sync-request
(function).
make-sync-request
(function).
sync-request-p
(function).
verbose/documentation.lisp
sync-request.lisp
(file).
verbose
(system).
Packages are listed by definition order.
org.shirakumo.verbose
common-lisp
.
piping
.
*default-message-class*
(special variable).
*global-controller*
(special variable).
*levels*
(special variable).
*muffled-categories*
(special variable).
*process-locally*
(special variable).
*timestamp-format*
(special variable).
add-level
(function).
add-pipe
(function).
add-repl-category
(function).
ansi-colors
(generic reader).
(setf ansi-colors)
(generic writer).
categories
(generic reader).
(setf categories)
(generic writer).
category-filter
(class).
category-tree-filter
(class).
condition-message
(class).
content
(generic reader).
(setf content)
(generic writer).
controller
(class).
controller-loop
(generic function).
debug
(compiler macro).
debug
(function).
define-level
(macro).
define-pipe
(macro).
error
(compiler macro).
error
(function).
fatal
(compiler macro).
fatal
(function).
file
(generic reader).
(setf file)
(generic writer).
file-faucet
(class).
format-message
(generic function).
info
(compiler macro).
info
(function).
interval
(generic reader).
(setf interval)
(generic writer).
last-rotation
(generic reader).
(setf last-rotation)
(generic writer).
level
(generic reader).
(setf level)
(generic function).
level-filter
(class).
log
(generic function).
log-message
(function).
log-object
(function).
make-standard-global-controller
(function).
matching-tree-category
(function).
message
(class).
message-condition
(generic reader).
(setf message-condition)
(generic writer).
output
(generic reader).
(setf output)
(generic writer).
output-here
(function).
queue
(generic reader).
(setf queue)
(generic writer).
queue-back
(generic reader).
(setf queue-back)
(generic writer).
queue-condition
(generic reader).
queue-lock
(generic reader).
remove-global-controller
(function).
remove-repl-category
(function).
repl-categories
(function).
(setf repl-categories)
(function).
repl-faucet
(class).
repl-level
(function).
(setf repl-level)
(function).
restart-global-controller
(function).
rotate
(generic function).
rotating-file-faucet
(class).
severe
(compiler macro).
severe
(function).
start
(generic function).
stop
(generic function).
stream-faucet
(class).
sync
(function).
sync-request
(structure).
sync-request-condition
(reader).
(setf sync-request-condition)
(writer).
sync-request-lock
(reader).
(setf sync-request-lock)
(writer).
template
(generic reader).
(setf template)
(generic writer).
thread
(generic reader).
(setf thread)
(generic writer).
thread-continue
(generic reader).
(setf thread-continue)
(generic writer).
timestamp
(generic reader).
(setf timestamp)
(generic writer).
trace
(compiler macro).
trace
(function).
warn
(compiler macro).
warn
(function).
with-controller-lock
(macro).
with-muffled-logging
(macro).
*verbose-conditions*
(special variable).
copy-sync-request
(function).
make-sync-request
(function).
removef
(function).
split
(function).
sync-request-p
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
The class designator of the message class to use when logging messages.
Stores the default controller.
While it is possible to have multiple controllers, there is not much reason to do so. The pipeline system should be flexible enough to bypass the need for multiple controllers. However, you can still instantiate multiple controllers and manage them in whatever way you like. Just make sure to bind this variable to the appropriate one if the function does not accept the controller as an argument directly.
Holds the alist of priorities to level names.
This list must be sorted in ascending order of priorities.
See ADD-LEVEL
See DEFINE-LEVEL
Variable containing a list of categories that should get muffled upon issuing.
If one of the categories is T, all messages are muffled.
When a category is muffled, it is effectively removed from the
message. If a message has no categories whatsoever, it is not
issued.
See WITH-MUFFLED-LOGGING
Whether to process messages in the current thread.
If this is T, then the messages will be shot through the pipeline
in the thread whether the log statement is issued. This may be
useful on systems where thread support is not necessary, but will
most likely be less performant.
If you really do not need to use threads, it is probably a better idea to simply shut down the controller’s thread anyway. You can do this with STOP.
The format in which timestamps will be formatted for messages.
See LOCAL-TIME:FORMAT-TIMESTRING
Defines a new level by adding it and constructing a helper function.
The helper function will automatically be exported, if its name
is in the VERBOSE package (as it is by default).
See ADD-LEVEL
Shorthand convenience macro to define new pipes.
SEGMENT ::= (class-name NAME? INITARG*)
NAME ::= :name symbol
INITARG ::= keyword value
The optional name if given will be automatically assigned to the pipe segment, so that it can be retrieved through FIND-PLACE
See PIPING:FIND-PLACE
Evaluates FORMS with the controller’s lock held.
This will block until it can acquire the lock.
See QUEUE-LOCK
Adds the requested categories to the list of muffled categories.
See *MUFFLED-CATEGORIES*
Adds or updates a level with the given priority and level.
If a level with the requested name already exists, its
priority is updated. Otherwise a new level is added.
See *LEVELS*
Adds a new pipe to the controller.
The first argument may be the controller object to modify.
Constructs a pipe with the given segments as per MAKE-PIPE and INSERT, then finally adds the segment to the controller by ADD-SEGMENT.
Convenience function to add more categories.
The first argument may be the controller object to modify.
See REPL-CATEGORIES
Log to the DEBUG level.
Log to the ERROR level.
Log to the FATAL level.
Log to the INFO level.
Constructs a logging message and sends it off to be logged.
See *DEFAULT-MESSAGE-CLASS*
See LOG-OBJECT
Passes the given object to the global controller if it exists.
See *GLOBAL-CONTROLLER*
See PIPING:PASS
Constructs a new controller object with a single pipe in the pipeline
The pipe has a level-filter, category-tree-filter, and repl-faucet.
All arguments to this function are simply passed as initargs to
the construction of the CONTROLLER instance.
See LEVEL-FILTER
See CATEGORY-TREE-FILTER
See REPL-FAUCET
See CONTROLLER
This returns T if
FILTER and CATEGORY are EQL or
Both can be turned into sequences of items by splitting
their SYMBOL-NAMEs on every occurrence of a period and
each item in the list made from FILTER occurs in the same
order at the beginning of the list made from CATEGORY.
More simply put, if category is a sub-branch of filter, it passes the test.
Modifies the standard repl faucet to output to the given stream.
Also useful when the *STANDARD-OUTPUT* changes, such as in the case of SWANK and multiple connections to the same instance.
See REPL-FAUCET
Stops and entirely removes the global controller, if present.
See STOP
See *GLOBAL-CONTROLLER*
Convenience function to remove repl categories.
The first argument may be the controller object to modify.
See REPL-CATEGORIES
Accessor to the categories that will be printed at the REPL.
See CATEGORY-TREE-FILTER
See ADD-REPL-CATEGORY
See REMOVE-REPL-CATEGORY
Accessor to the current logging level that should be output to the REPL.
See LEVEL-FILTER
See *LEVELS*
Replaces the current global controller (if any) with a freshly allocated one.
In case things really messed up somehow, this may resolve your problems
at the cost of throwing away messages that are still queued up, and
restoring the standard pipeline.
See REMOVE-GLOBAL-CONTROLLER
See *GLOBAL-CONTROLLER*
See MAKE-STANDARD-GLOBAL-CONTROLLER
Log to the SEVERE level.
Blocks the current thread until all messages before this point have been processed.
If the controller is not running a thread, this does nothing.
Otherwise this is achieved by constructing and then passing
a SYNC-REQUEST instance to the controller.
See SYNC-REQUEST
Accessor to the condition variable for the sync request.
See SYNC-REQUEST
Accessor to the lock for the sync request.
See SYNC-REQUEST
lock
.
Log to the TRACE level.
Log to the WARN level.
repl-faucet
)) ¶automatically generated reader method
repl-faucet
)) ¶automatically generated writer method
The categories against which the object operates.
See MESSAGE
See CATEGORY-FILTER
category-filter
)) ¶automatically generated reader method
category-filter
)) ¶automatically generated writer method
The primary content that the message carries.
Usually when the message is formatted, this will be printed by PRINC.
See FORMAT-MESSAGE
See MESSAGE
Main function of the controller’s background thread. Should handle message processing.
This function should return when THREAD-CONTINUE is set to NIL.
See CONTROLLER
controller
)) ¶Accessor to the file to which the faucet is currently outputting.
file-faucet
)) ¶automatically generated reader method
file
.
file-faucet
)) ¶file
.
Formats the message according to the given thing.
Standard implementations exist for NULL and STREAM.
NULL will always return a string, and STREAM will print the
message to the stream.
You will want to extend or override methods on this to change
the way messages are presented.
See MESSAGE
repl-faucet
) (message message
)) ¶stream-faucet
) (message message
)) ¶stream-faucet
) thing) ¶stream-faucet
) thing) ¶null
) (func function
)) ¶null
) message) ¶The interval in which the faucet’s file is rotated.
Can be one of :HOURLY :DAILY :MONTHLY :WEEKLY
See ROTATING-LOG-FAUCET
rotating-file-faucet
)) ¶automatically generated reader method
rotating-file-faucet
)) ¶The universal-time timestamp of the last rotation.
See ROTATE
See ROTATING-LOG-FAUCET
rotating-file-faucet
)) ¶automatically generated reader method
rotating-file-faucet
)) ¶automatically generated writer method
The level at which the object operates.
See *LEVELS*
See MESSAGE
See LEVEL-FILTER
level-filter
)) ¶automatically generated reader method
level-filter
)) ¶level-filter
)) ¶automatically generated writer method
Causes a message to be logged as appropriate for the given datum.
By default, methods for STRING, SYMBOL, FUNCTION, and T exist.
STRING — The string is taken as a format string and the args
as format arguments.
SYMBOL — The symbol is taken as condition or class name and
a condition/class is constructed with the args as
initargs.
FUNCTION — The function is wrapped in a lambda as a call with
the arguments. This will then cause the function to
get called during the processing of the message
when FORMAT-MESSAGE is called.
T — The arguments are discarded and the datum is used
as the CONTENT of the message.
See LOG-MESSAGE
condition
) &rest args) ¶function
) &rest args) ¶symbol
) &rest args) ¶string
) &rest args) ¶Accessor to the condition that the message carries.
See CONDITION-MESSAGE
condition-message
)) ¶automatically generated reader method
condition-message
)) ¶automatically generated writer method
The stream to which the stream-faucet outputs the messages.
See STREAM-FAUCET
stream-faucet
)) ¶automatically generated reader method
stream-faucet
)) ¶automatically generated writer method
The vector for the front message queue.
In order to add messages to this queue, you should use VECTOR-PUSH-EXTEND wrapped in a WITH-CONTROLLER-LOCK.
See CONTROLLER
controller
)) ¶automatically generated reader method
controller
)) ¶automatically generated writer method
The back queue for the controller.
This is swapped with the front QUEUE when the controller decides
to start processing messages.
See CONTROLLER
controller
)) ¶automatically generated reader method
controller
)) ¶automatically generated writer method
The condition variable the controller will wait on until signalled.
See CONTROLLER
controller
)) ¶automatically generated reader method
The lock to mutually exclude the controller thread and other threads from accessing the queues simultaneously.
See CONTROLLER
controller
)) ¶automatically generated reader method
Causes the faucet to rotate to a new file immediately.
See ROTATING-LOG-FAUCET
rotating-file-faucet
) &optional new-file) ¶Starts the background thread of the controller.
If there is no thread support, this does nothing.
If there is already a thread active on the controller, a continuable
error is signalled.
See CONTROLLER
controller
)) ¶Stops the background thread of the controller.
If there is no thread support, this does nothing.
This function may take up to ~0.5s as it waits for the thread to
exit on its own. If it still fails then, it will call
BT:DESTROY-THREAD and hope that it will terminate properly.
See CONTROLLER
controller
)) ¶The pathname serving as a template for the rotated files.
See ROTATING-LOG-FAUCET
rotating-file-faucet
)) ¶automatically generated reader method
rotating-file-faucet
)) ¶automatically generated writer method
Accessor to the thread held by the object.
See CONTROLLER
See MESSAGE
message
)) ¶automatically generated reader method
controller
)) ¶automatically generated reader method
message
)) ¶automatically generated writer method
controller
)) ¶automatically generated writer method
Whether the controller thread should continue or not.
See CONTROLLER
controller
)) ¶automatically generated reader method
controller
)) ¶automatically generated writer method
The timestamp recorded from the time of issuing of the message.
See LOCAL-TIME:TIMESTAMP
See MESSAGE
controller
) &key dont-start) ¶rotating-file-faucet
) &key interval) ¶file-faucet
) &key file) ¶level-filter
) &key level) ¶controller
) (message message
)) ¶piping
.
controller
) message) ¶piping
.
vector
) (sync sync-request
)) ¶piping
.
category-filter
) (message message
)) ¶piping
.
rotating-file-faucet
) thing) ¶piping
.
stream-faucet
) message) ¶piping
.
category-tree-filter
) (message message
)) ¶piping
.
level-filter
) (message message
)) ¶piping
.
controller
) stream) ¶repl-faucet
) stream) ¶Struct to hold a request for synchronisation.
When this object is processed by being passed down a vector
it will first acquire and immediately release its lock and
then notify its condition variable. The lock serves as a
rendezvous point.
See SYNC-REQUEST-CONDITION
See SYNC-REQUEST-LOCK
See SYNC
Only lets through messages that contain a category in the filter’s categories list.
CATEGORIES can be T in which case all messages are let through.
See CATEGORIES
See PIPING:FILTER
filter
.
t
:categories
Only lets through messages that match a category in the filter’s category list.
See MATCHING-TREE-CATEGORY
See CATEGORY-FILTER
pass
.
Message class to handle conditions being logged.
See *VERBOSE-CONDITIONS*
See MESSAGE-CONDITION
Initarg | Value |
---|---|
:condition | (error condition required.) |
common-lisp
.
:condition
This is the central piece that handles log messages.
By default a background thread is spawned that processes the
messages. You can control the thread with START and STOP and
enqueue messages with PASS. You can prevent the controller
from being automatically STARTed by passing :DONT-START T as
an initarg.
See THREAD
See THREAD-CONTINUE
See QUEUE
See QUEUE-BACK
See QUEUE-CONDITION
See QUEUE-LOCK
See START
See STOP
See PIPING:PASS
pipeline
.
(make-array (quote (10)) :adjustable t :fill-pointer 0)
(make-array (quote (10)) :adjustable t :fill-pointer 0)
(bordeaux-threads:make-condition-variable :name "message-condition")
This slot is read-only.
(bordeaux-threads:make-lock "message-lock")
This slot is read-only.
A faucet that outputs to a file.
See FILE
See STREAM-FAUCET
Only lets through messages that are of the given level or higher.
LEVEL can be either the name of a level in *LEVELS* or an
integer of the appropriate size.
See LEVEL
See PIPING:FILTER
filter
.
Initarg | Value |
---|---|
:level | info |
:info
The base class for most logging messages that will be sent through the framework.
See TIMESTAMP
See THREAD
See LEVEL
See CATEGORIES
See CONTENT
See FORMAT-MESSAGE
See LOG-MESSAGE
Initarg | Value |
---|---|
:timestamp | (now) |
:thread | (current-thread) |
:level | info |
:categories | nil |
:content | nil |
:timestamp
:thread
:level
:categories
:content
A faucet that prints to the *standard-output*.
See REPL-FAUCET
A faucet that prints the messages it receives to a stream.
Messages are first passed through FORMAT-MESSAGE on the
faucet itself, and then on the output stream.
See OUTPUT
See PIPING:FAUCET
faucet
.
:output
Whether to print a full stack trace with a condition.
See DISSECT:PRESENT
Constructs a copy of the plist where the key-value pairs in keys are not included.
Splits the STRING into a list of strings where ON is taken as the character to split by.
Jump to: | (
A C D E F G I L M O P Q R S T W |
---|
Jump to: | (
A C D E F G I L M O P Q R S T W |
---|
Jump to: | *
A C F I L O Q S T |
---|
Jump to: | *
A C F I L O Q S T |
---|
Jump to: | C D F L M O P R S T V |
---|
Jump to: | C D F L M O P R S T V |
---|