On this page:

17 Logging

 (require koyo/logging) package: koyo-lib

This module provides utilities for displaying log messages.


(start-logger #:levels levels    
  [#:parent parent    
  #:output-port out])  (-> void?)
  levels : (listof (cons/c symbol? log-level/c))
  parent : logger? = (current-logger)
  out : port? = (current-error-port)
Starts a background thread that receives logs based on levels and writes them to out using the following format:

    [<timestamp>] [<pid>] [<level>] <topic>: <message>

The levels argument is a list of topic and level pairs.

The return value is a function that will stop the background thread when called. Calling the stopper function after the thread has been stopped has no effect.