Config file failures unexplained in list or JIRA

I am encountering several initialization errors with the logback.xml file (below) that do not seem to be addressed in either this mailing list or JIRA. I am running Logback 1.0.7 with SLF4J 1.7.2. During initialization I receive the following Logback errors: 1. No applicable action for [outputPatternAsHeader]. Try as I might, I can not get Logback to recognize this property. 2. No applicable action for [immediateFlush]. This error may be expected, as I was able to glean from the list and JIRA that this property has been eliminated. Please confirm. 3. no applicable action for [withJansi] / There is no conversion class registered for composite conversion word [highlight]. I am including jansi-1.8.jar in the classpath but, obviously, this wouldn’t even come into play if withJansi isn’t even recognized. 4. Could not find Janino library on the class path. Skipping conditional processing. Both commons-compiler.jar and janino.jar 2.6.1 are on the classpath. I understand that there are potential issues with the use of conditional processing because of Janino and I’m wondering if I should abandon this feature, though it makes the config file significantly more elegant. Here is the config file: <?xml version="1.0" encoding="UTF-8"?> <configuration debug="true"> <property name="rootLevel" value="DEBUG"/> <property name="deployment" value="DEV"/> <property name="logFileFolder" value="c:/tmp/its"/> <property name="logFileName" value="Idcp"/> <property name="baseLayoutPattern" value="%logger{}.%method - %msg%n"/> <property name="fileLayoutPattern" value="%-5level ${baseLayoutPattern}"/> <property name="consoleLayoutPattern" value="%highlight(%-5level) ${baseLayoutPattern}"/> <property name="flowRowLayoutPattern" value="%msg%n"/> <property name="rollingPolicyPattern" value="${logFileFolder}/%d{yyyy-MM-dd}--${logFileName}.log"/> <property name="rollingPolicyMaxHistory" value="7"/> <!-- General purpose file appender --> <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${logFileFolder}/${logFileName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${rollingPolicyPattern}</fileNamePattern> <maxHistory>${rollingPolicyMaxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${fileLayoutPattern}</pattern> <!-- this quadruples logging throughput --> <immediateFlush>false</immediateFlush> <outputPatternAsHeader>true</outputPatternAsHeader> </encoder> </appender> <!-- Flow row file appender --> <appender name="fileFlowRow" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${logFileFolder}/${logFileName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${rollingPolicyPattern}</fileNamePattern> <maxHistory>${rollingPolicyMaxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${flowRowLayoutPattern}</pattern> <!-- this quadruples logging throughput --> <immediateFlush>false</immediateFlush> <outputPatternAsHeader>true</outputPatternAsHeader> </encoder> </appender> <!-- General console appender --> <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <withJansi>true</withJansi> <encoder> <pattern>${consoleLayoutPattern}</pattern> </encoder> </appender> <!-- Flow row console appender --> <appender name="consoleFlowRow" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${flowRowLayoutPattern}</pattern> </encoder> </appender> <!-- Flow row logger --> <logger name="idcpFlowRow" level="INHERITED"> <appender-ref ref="fileFlowRow"/> <if condition='!property("deployment").contains("PROD")'> <then> <appender-ref ref="consoleFlowRow"/> </then> </if> </logger> <!-- Root logger only sets level --> <root level="${rootLevel}"> <appender-ref ref="file"/> <if condition='!property("deployment").contains("PROD")'> <then> <appender-ref ref="console"/> </then> </if> </root> </configuration> If I did something stupid or missed an explanation of these failures in the list, I apologize in advance. Thanks for your help. -- View this message in context: http://old.nabble.com/Config-file-failures-unexplained-in-list-or-JIRA-tp347... Sent from the Logback User mailing list archive at Nabble.com.

Anyone? It would be so helpful to know whether these features have been deprecated, I've encountered recently introduced defects, or whether I'm just doing something wrong. I'm hoping for the latter. RobOaks wrote:
I am encountering several initialization errors with the logback.xml file (below) that do not seem to be addressed in either this mailing list or JIRA. I am running Logback 1.0.7 with SLF4J 1.7.2.
During initialization I receive the following Logback errors: 1. No applicable action for [outputPatternAsHeader]. Try as I might, I can not get Logback to recognize this property. 2. No applicable action for [immediateFlush]. This error may be expected, as I was able to glean from the list and JIRA that this property has been eliminated. Please confirm. 3. no applicable action for [withJansi] / There is no conversion class registered for composite conversion word [highlight]. I am including jansi-1.8.jar in the classpath but, obviously, this wouldn’t even come into play if withJansi isn’t even recognized. 4. Could not find Janino library on the class path. Skipping conditional processing. Both commons-compiler.jar and janino.jar 2.6.1 are on the classpath. I understand that there are potential issues with the use of conditional processing because of Janino and I’m wondering if I should abandon this feature, though it makes the config file significantly more elegant.
Here is the config file:
<?xml version="1.0" encoding="UTF-8"?> <configuration debug="true"> <property name="rootLevel" value="DEBUG"/> <property name="deployment" value="DEV"/> <property name="logFileFolder" value="c:/tmp/its"/> <property name="logFileName" value="Idcp"/> <property name="baseLayoutPattern" value="%logger{}.%method - %msg%n"/> <property name="fileLayoutPattern" value="%-5level ${baseLayoutPattern}"/> <property name="consoleLayoutPattern" value="%highlight(%-5level) ${baseLayoutPattern}"/> <property name="flowRowLayoutPattern" value="%msg%n"/> <property name="rollingPolicyPattern" value="${logFileFolder}/%d{yyyy-MM-dd}--${logFileName}.log"/> <property name="rollingPolicyMaxHistory" value="7"/> <!-- General purpose file appender --> <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${logFileFolder}/${logFileName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${rollingPolicyPattern}</fileNamePattern> <maxHistory>${rollingPolicyMaxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${fileLayoutPattern}</pattern> <!-- this quadruples logging throughput --> <immediateFlush>false</immediateFlush> <outputPatternAsHeader>true</outputPatternAsHeader> </encoder> </appender> <!-- Flow row file appender --> <appender name="fileFlowRow" class="ch.qos.logback.core.rolling.RollingFileAppender"> <file>${logFileFolder}/${logFileName}.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${rollingPolicyPattern}</fileNamePattern> <maxHistory>${rollingPolicyMaxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${flowRowLayoutPattern}</pattern> <!-- this quadruples logging throughput --> <immediateFlush>false</immediateFlush> <outputPatternAsHeader>true</outputPatternAsHeader> </encoder> </appender> <!-- General console appender --> <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <withJansi>true</withJansi> <encoder> <pattern>${consoleLayoutPattern}</pattern> </encoder> </appender> <!-- Flow row console appender --> <appender name="consoleFlowRow" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${flowRowLayoutPattern}</pattern> </encoder> </appender> <!-- Flow row logger --> <logger name="idcpFlowRow" level="INHERITED"> <appender-ref ref="fileFlowRow"/> <if condition='!property("deployment").contains("PROD")'> <then> <appender-ref ref="consoleFlowRow"/> </then> </if> </logger> <!-- Root logger only sets level --> <root level="${rootLevel}"> <appender-ref ref="file"/> <if condition='!property("deployment").contains("PROD")'> <then> <appender-ref ref="console"/> </then> </if> </root> </configuration>
If I did something stupid or missed an explanation of these failures in the list, I apologize in advance.
Thanks for your help.
-- View this message in context: http://old.nabble.com/Config-file-failures-unexplained-in-list-or-JIRA-tp347... Sent from the Logback User mailing list archive at Nabble.com.

On Fri, Nov 23, 2012 at 7:41 AM, RobOaks <roboaks@comcast.net> wrote:
I am encountering several initialization errors with the logback.xml file (below) that do not seem to be addressed in either this mailing list or JIRA. I am running Logback 1.0.7 with SLF4J 1.7.2.
During initialization I receive the following Logback errors: 1. No applicable action for [outputPatternAsHeader]. Try as I might, I can not get Logback to recognize this property.
Double-check your classpath. It might be pointing to a version of logback that's older than 1.0.3 (where <outputPatternAsHeader> was introduced). [1] 2. No applicable action for [immediateFlush]. This error may be expected, as
I was able to glean from the list and JIRA that this property has been eliminated. Please confirm.
No, <immediateFlush> is still a valid property for layout encoders in logback-1.0.7. [2] 3. no applicable action for [withJansi] / There is no conversion class
registered for composite conversion word [highlight]. I am including jansi-1.8.jar in the classpath but, obviously, this wouldn’t even come into play if withJansi isn’t even recognized.
I don't have a Windows machine handy at the moment, but I'm guessing it's the same issue mentioned previously (an old version of logback in your classpath).
4. Could not find Janino library on the class path. Skipping conditional processing. Both commons-compiler.jar and janino.jar 2.6.1 are on the classpath. I understand that there are potential issues with the use of conditional processing because of Janino and I’m wondering if I should abandon this feature, though it makes the config file significantly more elegant.
To use Janino, you must include *two* relevant jars: janino.jar and commons-compiler.jar. [3] I just tried your logback configuration with logback-1.0.7 and Janino, and there were no config errors. It output correctly to the console (with the color codes), and it correctly wrote the pattern header to the log file at /tmp/its/Idcp.log. [4] I wrote a HelloWorld application (output via SLF4J) with Eclipse Juno on OSX Mountain Lion. I included the following jars: * slf4j-api-1.7.2.jar * logback-core-1.0.7.jar * logback-classic-1.0.7.jar * janino-commons-compiler-2.6.1.jar * janino-2.6.1.jar [1] http://logback.qos.ch/apidocs/ch/qos/logback/core/pattern/PatternLayoutEncod...) [2] http://logback.qos.ch/apidocs/ch/qos/logback/core/encoder/LayoutWrappingEnco...) [3] http://logback.qos.ch/setup.html#janino [4] http://pastebin.com/ZJpdbf2c

Thanks so much for your detailed response Tony. Fortunately, I think it was indeed mostly me :-). I am using Logback in the context of Talend, an ETL platform that is built on Eclipse. Perhaps there were some Talend references to older Logback JARs or something because once I fiddled around with classpath relates settings, the config file parsing errors went away. The one thing that still doesn't work is ANSI highlighting in the Talend (Eclipse) studio. However, I think this is explained by http://old.nabble.com/-JIRA--%28LOGBACK-762%29-Jansi-fails-on-x64-Windows-7-.... tony19 wrote:
On Fri, Nov 23, 2012 at 7:41 AM, RobOaks <roboaks@comcast.net> wrote:
I am encountering several initialization errors with the logback.xml file (below) that do not seem to be addressed in either this mailing list or JIRA. I am running Logback 1.0.7 with SLF4J 1.7.2.
During initialization I receive the following Logback errors: 1. No applicable action for [outputPatternAsHeader]. Try as I might, I can not get Logback to recognize this property.
Double-check your classpath. It might be pointing to a version of logback that's older than 1.0.3 (where <outputPatternAsHeader> was introduced). [1]
2. No applicable action for [immediateFlush]. This error may be expected, as
I was able to glean from the list and JIRA that this property has been eliminated. Please confirm.
No, <immediateFlush> is still a valid property for layout encoders in logback-1.0.7. [2]
3. no applicable action for [withJansi] / There is no conversion class
registered for composite conversion word [highlight]. I am including jansi-1.8.jar in the classpath but, obviously, this wouldn’t even come into play if withJansi isn’t even recognized.
I don't have a Windows machine handy at the moment, but I'm guessing it's the same issue mentioned previously (an old version of logback in your classpath).
4. Could not find Janino library on the class path. Skipping conditional processing. Both commons-compiler.jar and janino.jar 2.6.1 are on the classpath. I understand that there are potential issues with the use of conditional processing because of Janino and I’m wondering if I should abandon this feature, though it makes the config file significantly more elegant.
To use Janino, you must include *two* relevant jars: janino.jar and commons-compiler.jar. [3]
I just tried your logback configuration with logback-1.0.7 and Janino, and there were no config errors. It output correctly to the console (with the color codes), and it correctly wrote the pattern header to the log file at /tmp/its/Idcp.log. [4]
I wrote a HelloWorld application (output via SLF4J) with Eclipse Juno on OSX Mountain Lion. I included the following jars: * slf4j-api-1.7.2.jar * logback-core-1.0.7.jar * logback-classic-1.0.7.jar * janino-commons-compiler-2.6.1.jar * janino-2.6.1.jar
[1] http://logback.qos.ch/apidocs/ch/qos/logback/core/pattern/PatternLayoutEncod...) [2] http://logback.qos.ch/apidocs/ch/qos/logback/core/encoder/LayoutWrappingEnco...) [3] http://logback.qos.ch/setup.html#janino [4] http://pastebin.com/ZJpdbf2c
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://old.nabble.com/Config-file-failures-unexplained-in-list-or-JIRA-tp347... Sent from the Logback User mailing list archive at Nabble.com.
participants (2)
-
RobOaks
-
Tony Trinh