The graylog Reference Manual

This is the graylog Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 04:04:27 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 graylog

Graylog Lisp client

Author

Mariano Montone <>

License

MIT

Dependencies
  • local-time (system).
  • usocket (system).
  • babel (system).
  • salza2 (system).
  • cl-json (system).
  • trivial-backtrace (system).
Source

graylog.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 graylog/graylog.asd

Source

graylog.asd.

Parent Component

graylog (system).

ASDF Systems

graylog.


3.1.2 graylog/package.lisp

Source

graylog.asd.

Parent Component

graylog (system).

Packages

graylog.


3.1.3 graylog/graylog.lisp

Dependency

package.lisp (file).

Source

graylog.asd.

Parent Component

graylog (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 graylog

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-graylog-connection ((&key host port) &body body)

Run body within the scope of a graylog connection

Package

graylog.

Source

graylog.lisp.


5.1.2 Ordinary functions

Function: connect-graylog (&key host port hostname)

Connect to a graylog instance

HOSTNAME: According to GELF spec, it can be the name of the host, source or application that sent this message

Package

graylog.

Source

graylog.lisp.

Function: connect-graylog-toplevel (&rest args)

Connect to graylog and set the global connection

Package

graylog.

Source

graylog.lisp.

Function: graylog (message &rest args &key level backtrace host connection &allow-other-keys)

Log to graylog using GELF

https://www.graylog.org/resources/gelf/

Version 1.1 (11/2013)
A GELF message is a GZIP’d or ZLIB’d JSON string with the following fields:

version string (UTF-8)

GELF spec version – “1.1”; MUST be set by client library.

host string (UTF-8)

the name of the host, source or application that sent this message; MUST be set by client library.

short_message string (UTF-8)

a short descriptive message; MUST be set by client library.

full_message string (UTF-8)

a long message that can i.e. contain a backtrace; optional.

timestamp number

Seconds since UNIX epoch with optional decimal places for milliseconds; SHOULD be set by client library. Will be set to NOW by server if absent.

level number

the level equal to the standard syslog levels; optional, default is 1 (ALERT).

facility string (UTF-8)

optional, deprecated. Send as additional field instead.

line number

the line in a file that caused the error (decimal); optional, deprecated. Send as additional field instead.

file string (UTF-8)

the file (with path if you want) that caused the error (string); optional, deprecated. Send as additional field instead.

_[additional field] string (UTF-8) or number

every field you send and prefix with a _ (underscore) will be treated as an additional field. Allowed characters in field names are any word character (letter, number, underscore), dashes and dots. The verifying regular expression is: ^[w.-]*$

Libraries SHOULD not allow to send id as additional field (_id). Graylog server nodes omit this field automatically.

Package

graylog.

Source

graylog.lisp.

Function: graylog-connection (&key error-p)

Return the current graylog connection

Package

graylog.

Source

graylog.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *default-gelf-port*
Package

graylog.

Source

graylog.lisp.

Special Variable: *default-host-name*
Package

graylog.

Source

graylog.lisp.

Special Variable: *graylog-connection*
Package

graylog.

Source

graylog.lisp.


5.2.2 Ordinary functions

Function: call-with-graylog-connection (function &key host port hostname)
Package

graylog.

Source

graylog.lisp.


Appendix A Indexes


A.1 Concepts