Hi,

Is there a way to enable logging for a logger and all its descendants?

#lang racket

(define-logger lt)

(define (create-sublogger name)
  (make-logger name lt-logger))

(parameterize ([current-logger (create-sublogger 'foo)])
  (log-debug "hello"))

(log-lt-debug "goodbye")

I would have expected this to say "hello" and "goodbye" with debug@lt.
The reason I need something like this is because I want each thread in
my program to own it's own logger (so I know which message comes from
which thread). So I do something like:

(parameterize ([current-logger (create-sublogger lt-logger)])
   (thread
       (thunk ...)))

create-sublogger increases a counter, which makes it part of a topic and
returns a logger with that topic. I do not know the logger name. Simply
that lt-logger is its parent.

How can I achieve something like this?

-- 
Paulo Matos

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to