in reply to Re^2: encoding for $!
in thread encoding for $!

As was pointed out by an anonymous monk on Jun 29, 2014, Perl has an UFT-8 flag you can test(see perlunicode and related).

Since you know the locale your program is running with, for any message your central logging routine receives that is not flagged as UFT-8, you could then convert it.

(not tested, so not sure if this would work)