Logging
The Pedestal module pedestal.log contains components for logging and also reporting runtime operational metrics. Pedestal uses Logback (https://logback.qos.ch/) for logging and it can be configured by creating a logback.xml file in the project config directory. Natively, logback-classic implements SLF4J (https://www.slf4j.org/), which is used by Pedestal as well for logging. Pedestal implements each logging level—trace, debug, info, warn, and error—as macros that take key-value pairs as parameters, printed using the pr function (https://clojuredocs.org/clojure.core/pr). To log an exception via Pedestal logger, the :exception key must be used with a java.lang.Throwable object as a value assigned to it.
The default project template ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access