[racket] Hierarchical loggers
What's a sane way to set up hierarchical loggers among a set of modules
within a program? Say the main program file main.rkt has a logger named
'main, and it "require"s module foo which has a logger 'foo, whose
parent should be 'main. Module foo also "require"s module bar, which
has its own logger 'bar, whose parent should be 'foo. The only two ways
I can think of achieving this are 1) to have foo and bar provide a
procedure that takes a logger and defines the module's logger with the
passed logger as its parent, and 2) having each module unconditionally
set their loggers parent to the (current-logger) parameter and set that
parameter to the parent logger before loading each module. Option 1
seems much saner, but I'd like some advice on this.
Regards,
Aidan Gauland