[logback-user] Split logs to different files by MDC?

Yura Levandovskyy liova_89 at yahoo.ca
Tue Jun 12 20:17:26 CEST 2012


I have an application that has an mdc variable. How can I make a proper filter, so that if variable = test, all such output goes to one file, and to another file if variable is anything else?

I tried the following (not sure how to go from there even if it worked though):

        mdc?.get("variable") ~= /test/


but the result is 

ERROR in ch.qos.logback.classic.boolex.JaninoEventEvaluator at 7d55b9f - Could not start evaluator with expression [mdc?.get("variable") ~= /test/ )]

Any suggestions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120612/d1e84bab/attachment-0001.html>

More information about the Logback-user mailing list