1

Plack Middleware is very useful, for instance to configure logging targets independent of the application. But I have not found a method to use multiple loggers at the same time:

my $app = MyApp->new();

builder {
  enable 'ConsoleLogger'; # show in Client's console
  enable 'SimpleLogger';  # show on STDERR
  $app;
}

With this configuration 'SimpleLogger' is muted by 'ConsoleLogger', but I want to log by both at the same time.

Jakob
  • 3,570
  • 3
  • 36
  • 49

1 Answers1

1

As of this writing you can't. I've been thinking about having a new logger middleware that acts as a sort of proxy, to dispatch logging to multiple middleware, but haven't got any tuit to write one.

miyagawa
  • 1,329
  • 7
  • 9
  • 1
    Ok - that's not a positive answer, but at least I do not need to waste my time searching for a non-existing solution. A Proxy would be great but it's not on top of my priorities. – Jakob May 29 '11 at 18:46