~mna/tulip

The tulip.pkg.log module exports the log package. It registers a logging backend in JSON format.

#Configuration

  • level: string|number = the minimum log level to output. If set to a string, it should be either 'debug', 'error', 'info', or 'warning' or the first letter of those words. Can also be a number. The mapping of string level to number is: debug=1, info=10, warning=100 and error=1000.
  • file: string = path to a file to log to. If not set, will log to io.output().

#API Extensions

Registering this package provides the following method and field extensions.

#App.log_level: string|number

Sets the minimum log level to consider for all logging backends. Once the app is activated (in the call to app:run), if the level is a string, it is converted to a number.

#Registered Middleware

The following middleware are registered and can be referenced by name in the configuration.

#tulip.pkg.log

Registered if the tulip.pkg.middleware package is registered. Logs web requests.

#Registered Wmiddleware

The following wmiddleware (worker middleware) are registered and can be referenced by name in the configuration.

#tulip.pkg.log

Registered if the tulip.pkg.wmiddleware package is registered. Logs processed worker messages.

Back to index

About this wiki

commit 3ebfbd288b8e5c95fdf8ce2027a0e94cfa1c8976
Author: Martin Angers <martin.n.angers@gmail.com>
Date:   2021-02-25T14:07:12-05:00

Update to reflect Request:validate_body
Clone this wiki
https://git.sr.ht/~mna/tulip-wiki (read-only)
git@git.sr.ht:~mna/tulip-wiki (read/write)