You may wish to consider the logog system. logog offers exactly this kind of functionality but it does not have the implicit code dependencies that Pantheios has. logog is thread safe and it allows a high degree of control over what types of messages are logged at any point.
I'm logog's author and maintainer, so my opinion is a bit biased. But I did review rlog, Pantheios and other logging systems before implementing this one.
https://github.com/johnwbyrd/logog .