Common Lisp Package: CLACK.MIDDLEWARE.LOGGER

# Clack.Middleware.Logger - Clack Middleware for logging. ## SYNOPSIS ;; Output log messages. (clackup (builder <clack-middleware-logger> (lambda (env) (log-message :notice "You've got an access!") '(200 nil ("ok"))))) ;; Output log messages to other place. (clackup (builder (<clack-middleware-logger> :logger (make-instance '<clack-logger-file>)) (lambda (env) (log-message :notice "You've got an access!") '(200 nil ("ok"))))) ## DESCRIPTION Clack.Middleware.Logger allows you to logg messages without stopping the Lisp process. You can customize the minimum level, format, and output destination of log messages. Currently, Clack.Middleware.Logger can have only one logger. Sorry for the inconvenience. ## AUTHOR Eitarow Fukamachi (e.arrows@gmail.com) ## SEE ALSO * Clack.Logger

README:

MACRO

Private

SETF-IF-SLOT-BOUND (PLACE OBJECT SLOT)

Set slot if the slot is uninitialized.

GENERIC-FUNCTION

Private

OUTPUT (LOGGER MESSAGE)

Output log messages. All loggers must implement this method.

SLOT-ACCESSOR

Private

FORMAT-STRING (OBJECT)

Log message format string. See `clack.logger:*logger-format-string*'.

LOGGER (OBJECT)

Logger instance, inherits `<clack-logger-base>'. If unspecified, `<clack-logger-stream>' will be used by default, and will output logs to `*standard-output*'. If nil, won't output any logs.

SETFLOGGER (NEW-VALUE OBJECT)

Logger instance, inherits `<clack-logger-base>'. If unspecified, `<clack-logger-stream>' will be used by default, and will output logs to `*standard-output*'. If nil, won't output any logs.

MIN-LEVEL (OBJECT)

Minimum log level to output. See `clack.logger:*logger-min-level*'.

TIME-FORMAT (OBJECT)

Timestamp format string. See `clack.logger:*logger-time-format*'.

VARIABLE

Private

*LOGGER-FORMAT-STRING*

Log format string for cl:format. Example: 11/Feb/2011:03:37:39 +09:00 [CRITICAL] Help me!!

*LOGGER-OUTPUT-HOOK*

Callback function which will be invoked when logging.

*LOGGER-TIME-FORMAT*

Format list of timestamp in log messages. This is the same as LOCAL-TIME. Default: 11/Feb/2011:03:37:39 +09:00

Undocumented

*LOGGER-MIN-LEVEL*

CLASS

Public

<CLACK-MIDDLEWARE-LOGGER>

Clack Middleware for logging.

Private

Undocumented

<CLACK-LOGGER-STREAM>