I am trying to use Janino condition to instantiate default Logback SMTP appender if and only if javax.mail is present is application classpath. Here is my simple config file for that purposes:
There is no convenient way to write JAVAX_MAIL_EXISTS_IN_CLASSPATH state to sysout, so I am using an additional ConsoleAppender and '-Dlogback.debug=true' option to see value of my JAVAX_MAIL_EXISTS_IN_CLASSPATH variable.
It is always false, regardless if javax.mail jar exist in classpath, or not.
My environment is: Ubuntu 12.04, logback classic/core 1.0.13, Janino 2.6.1, javax.mail 1.4.
|