I have a Perl script that produces two different streams of data.
I need to log them to two separate log files.
I'm aware of 2 approaches that result in different log files but neither one seems helpful in my situation:
Using categories (which are Perl module names).
In my case, the streams are both produced in the same code ("main" package, but that's irrelevant, what matters is that literally I have lines of code next to each other logging to 2 locations that can't be separated into different Perl modules).
Using different loglevels.
However, both should log with the same priority (e.g. both are logging
info()
calls anderror()
as appropriate) so I can't use the FAQ recipe for logging WARN/ERROR to different files.