Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Plack 中间件非常有用,例如配置独立于应用程序的日志目标。但是我还没有找到同时使用多个记录器的方法:
my $app = MyApp->new(); builder { enable 'ConsoleLogger'; # show in Client's console enable 'SimpleLogger'; # show on STDERR $app; }
使用此配置,“SimpleLogger”被“ConsoleLogger”静音,但我想同时记录两者。
在撰写本文时,您还不能。我一直在考虑使用一个新的记录器中间件来充当一种代理,将日志记录分配到多个中间件,但没有准备好编写一个。