On this page:
logman
log-debug
log-info
log-warning
log-error
log-fatal
8.12

logman🔗ℹ

Lucas Sta Maria <lucas@priime.dev>

 (require logman) package: logman

logman is a package with small formatting additions to base logging. In particular, it specifies the message’s level and the time it was output. Note that it uses date-display-format for its time formatting, which is recommended to be set to 'iso-8601.

procedure

(log-debug message)  void?

  message : any/c

procedure

(log-info message)  void?

  message : any/c

procedure

(log-warning message)  void?

  message : any/c

procedure

(log-error message)  void?

  message : any/c

procedure

(log-fatal message)  void?

  message : any/c

Example:
> (parameterize ([date-display-format 'iso-8601])
   (with-logging-to-port (current-output-port)
     (lambda ()
       (log-debug "debug information")
       (log-info "regular information")
       (log-warning "warnings")
       (log-error "errors")
       (log-fatal "fatal errors"))
     'debug))

[DEBUG] 2024-02-07T13:42:04 - debug information

[INFO ] 2024-02-07T13:42:04 - regular information

[WARN ] 2024-02-07T13:42:04 - warnings

[ERROR] 2024-02-07T13:42:04 - errors

[FATAL] 2024-02-07T13:42:04 - fatal errors