This is the vom-json Reference Manual, version 2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 07:06:27 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
vom-json
A json-formatted logger for vom
Matt Novenstern <fisxoj@gmail.com>
(GIT https://github.com/fisxoj/vom-json.git)
MIT
.. image:: https://travis-ci.org/fisxoj/vom-json.svg?branch=master
:target: https://travis-ci.org/fisxoj/vom-json
:alt: Travis CI status badge
.. image:: https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg
:alt: Contributor Covenant
:target: CODE_OF_CONDUCT.md
:Source: ‘https://github.com/fisxoj/vom-json <https://github.com/fisxoj/vom-json>‘_
:Docs: ‘https://fisxoj.github.io/vom-json/ <https://fisxoj.github.io/vom-json/>‘_
vom-json is a complementary library to ‘vom <https://github.com/orthecreedence/vom>‘_, which changes the logger syntax to something like ‘lambda-log <https://github.com/KyleRoss/node-lambda-log/>‘_ which outputs its log messages in the JSON format. In some environments like AWS insights, this makes the log data more searchable.
You can use it two ways:
Wrap the body of your program in it using :macro:‘vom-json:with-json-logging‘::
(vom-json:with-json-logging
(vom:error "Oh noes!"))
;; => {"_logLevel":"error","_timestamp":"2020-05-11T18:23:58.569136Z","msg":"Oh noes!","_tags":[],"_package":"common-lisp-user"}
Enable the logger globally::
(vom-json:enable-json-logging)
This project is extremely inspired by ‘log4cl-json <https://github.com/40ants/log4cl-json/>‘_.
2
jonathan
(system).
local-time
(system).
vom
(system).
vom-json.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
vom-json/vom-json.lisp
vom-json
(system).
disable-json-formatter
(function).
enable-json-formatter
(function).
json-formatter
(function).
with-json-logging
(macro).
with-tags
(macro).
*last-formatter*
(special variable).
*tags*
(special variable).
Packages are listed by definition order.
vom-json
common-lisp
.
disable-json-formatter
(function).
enable-json-formatter
(function).
json-formatter
(function).
with-json-logging
(macro).
with-tags
(macro).
*last-formatter*
(special variable).
*tags*
(special variable).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Sets ‘vom <https://github.com/orthecreedence/vom>‘_’s log format to json for the body of the macro. You could, for example wrap the whole execution context of an app with this to ensure the app uses json logging but doesn’t interfere with... I dunno... another app running in the same image that you wan to use a different log format for some reason? It just seems right to include a “WITH-...“ macro in a lisp library.
A nestable macro to allow adding tags to log messages. Any log messages printed inside a :macro:‘with-tags‘ call should have those tags in the “tags“ array.
The inverse of :function:‘enable-json-formatter‘.
Changes :variable:‘vom:*log-formatter*‘ to :function:‘json-formatter‘, preserving the current log formatter for :function:‘disable-json-formatter‘ to restore, later.
The formatter which produces logs in json.
Has fields:
* “_logLevel“: The log level, eg. warn, info, &c.
* “msg“: The formatted message.
* “_tags“: Any tags included by :macro:‘with-tags‘ forms.
* “_timestamp“: An rfc3399 timestamp.
* “_package“: The package the log message originates from.
Jump to: | D E F J M W |
---|
Jump to: | D E F J M W |
---|
Jump to: | *
S |
---|
Jump to: | *
S |
---|
Jump to: | F P S V |
---|
Jump to: | F P S V |
---|