Re: Unit testing log4j JMS Appender
I am trying to convert my log4.properties from 1.x to log4j.xml 2.0-rc1 but I am running into this issue log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender class=org.apache.log4j.appender.TimeAndSizeRollingAppender name=search-indexer-async param value=false name=BufferedIO / param value='.'-MM-dd name=DatePattern / param value=true name=DateRollEnforced / param value=${mule.home}/logs/mule-app-client-api.log name=file / param value=500MB name=MaxFileSize / param value=10 name=MaxRollFileCount / layout class=org.apache.log4j.PatternLayout param value=[%d{MM/dd/ HH:mm:ss,SSS}] %-5p %c{3} [%t](%x): %m%n name=ConversionPattern / /layout !-- Log entries that make it past this filter will be logged -- /appender appender name=async class=org.apache.log4j.AsyncAppender param name=BufferSize value=4096 / param name=blocking value=false / appender-ref ref=search-indexer-async / /appender appender name=search-indexer-async-jms class=org.apache.log4j.net.JMSAppender param name=InitialContextFactoryName value=org.apache.activemq.jndi.ActiveMQInitialContextFactory / param name=ProviderURL value=tcp://localhost:61616 / param name=TopicBindingName value=indexTopicEndpoint / param name=TopicConnectionFactoryBindingName value=ConnectionFactory / appender-ref ref=async / /appender log4j:WARN No such property [blocking] in org.apache.log4j.AsyncAppender. log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassNotFoundException: org.apache.log4j.appender.TimeAndSizeRollingAppender at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160) at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:164) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:201) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415) at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:335) at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:781) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460) at org.apache.log4j.LogManager.clinit(LogManager.java:113) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272) at org.mule.util.SystemUtils.clinit(SystemUtils.java:35) at org.mule.tck.junit4.AbstractMuleTestCase.clinit(AbstractMuleTestCase.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:292) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at
Re: Unit testing log4j JMS Appender
The stack trace below shows the code trying to process an XML configuration with Log4j 1. You cannot have log4j version 1 on the classpath if you want to use version 2. The XML format between version 1 and 2 is different. Log4j 2 has a version 1 compatibility module you can use. Gary On Wed, Apr 2, 2014 at 1:07 PM, Mohit Anchlia mohitanch...@gmail.comwrote: I am trying to convert my log4.properties from 1.x to log4j.xml 2.0-rc1 but I am running into this issue log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender class=org.apache.log4j.appender.TimeAndSizeRollingAppender name=search-indexer-async param value=false name=BufferedIO / param value='.'-MM-dd name=DatePattern / param value=true name=DateRollEnforced / param value=${mule.home}/logs/mule-app-client-api.log name=file / param value=500MB name=MaxFileSize / param value=10 name=MaxRollFileCount / layout class=org.apache.log4j.PatternLayout param value=[%d{MM/dd/ HH:mm:ss,SSS}] %-5p %c{3} [%t](%x): %m%n name=ConversionPattern / /layout !-- Log entries that make it past this filter will be logged -- /appender appender name=async class=org.apache.log4j.AsyncAppender param name=BufferSize value=4096 / param name=blocking value=false / appender-ref ref=search-indexer-async / /appender appender name=search-indexer-async-jms class=org.apache.log4j.net.JMSAppender param name=InitialContextFactoryName value=org.apache.activemq.jndi.ActiveMQInitialContextFactory / param name=ProviderURL value=tcp://localhost:61616 / param name=TopicBindingName value=indexTopicEndpoint / param name=TopicConnectionFactoryBindingName value=ConnectionFactory / appender-ref ref=async / /appender log4j:WARN No such property [blocking] in org.apache.log4j.AsyncAppender. log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassNotFoundException: org.apache.log4j.appender.TimeAndSizeRollingAppender at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160) at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:164) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:201) at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140) at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153) at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415) at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:335) at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:781) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616) at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460) at org.apache.log4j.LogManager.clinit(LogManager.java:113) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272) at org.mule.util.SystemUtils.clinit(SystemUtils.java:35) at org.mule.tck.junit4.AbstractMuleTestCase.clinit(AbstractMuleTestCase.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at
Re: Unit testing log4j JMS Appender
It appears that the dependency jar is trying to use log4j 1. Do you have any suggestion on how I can resolve this issue? This is my new config and error follows that: ?xml version=1.0 encoding=UTF-8? Configuration status=warn name=MyApp packages= Appenders RollingFile name=search-indexer-async-log fileName=${mule.home}/logs/mule-search-indexer-async.log filePattern=logs/app-%d{MM-dd-}.log.gz PatternLayout Pattern[%d{MM/dd/ HH:mm:ss,SSS}] %-5p %c{3} [%t](%x): %m%n/pattern /PatternLayout TimeBasedTriggeringPolicy / SizeBasedTriggeringPolicy size=500 MB/ /RollingFile Async name=async blocking=false AppenderRef ref=search-indexer-async-log/ /Async JMSTopic name=search-indexer-async-jms-topic topicBindingName=indexTopicEndpoint factoryBindingName=ConnectionFactory providerURL=tcp://localhost:61616/ Async name=async-jms blocking=false AppenderRef ref=search-indexer-async-jms-topic/ /Async /Appenders Loggers Logger name=com.intuit.cfp.search.async additivity=false level=TRACE AppenderRef ref=async-jms/ /Logger Root level=error AppenderRef ref=async/ /Root /Loggers /Configuration SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/manchlia/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/manchlia/.m2/repository/org/apache/activemq/activemq-all/5.9.0/activemq-all-5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. log4j:WARN Continuable parsing error 2 and column 68 log4j:WARN Document root element Configuration, must match DOCTYPE root null. log4j:WARN Continuable parsing error 2 and column 68 log4j:WARN Document is invalid: no grammar found. log4j:ERROR DOM element is - not a log4j:configuration element. log4j:WARN No appenders could be found for logger (org.apache.activemq.broker.BrokerService). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. On Wed, Apr 2, 2014 at 10:12 AM, Gary Gregory garydgreg...@gmail.comwrote: The stack trace below shows the code trying to process an XML configuration with Log4j 1. You cannot have log4j version 1 on the classpath if you want to use version 2. The XML format between version 1 and 2 is different. Log4j 2 has a version 1 compatibility module you can use. Gary On Wed, Apr 2, 2014 at 1:07 PM, Mohit Anchlia mohitanch...@gmail.com wrote: I am trying to convert my log4.properties from 1.x to log4j.xml 2.0-rc1 but I am running into this issue log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender class=org.apache.log4j.appender.TimeAndSizeRollingAppender name=search-indexer-async param value=false name=BufferedIO / param value='.'-MM-dd name=DatePattern / param value=true name=DateRollEnforced / param value=${mule.home}/logs/mule-app-client-api.log name=file / param value=500MB name=MaxFileSize / param value=10 name=MaxRollFileCount / layout class=org.apache.log4j.PatternLayout param value=[%d{MM/dd/ HH:mm:ss,SSS}] %-5p %c{3} [%t](%x): %m%n name=ConversionPattern / /layout !-- Log entries that make it past this filter will be logged -- /appender appender name=async class=org.apache.log4j.AsyncAppender param name=BufferSize value=4096 / param name=blocking value=false / appender-ref ref=search-indexer-async / /appender appender name=search-indexer-async-jms class=org.apache.log4j.net.JMSAppender param name=InitialContextFactoryName value=org.apache.activemq.jndi.ActiveMQInitialContextFactory / param name=ProviderURL value=tcp://localhost:61616 / param name=TopicBindingName value=indexTopicEndpoint / param name=TopicConnectionFactoryBindingName value=ConnectionFactory / appender-ref ref=async / /appender log4j:WARN No such property [blocking] in org.apache.log4j.AsyncAppender. log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassNotFoundException: org.apache.log4j.appender.TimeAndSizeRollingAppender at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160) at
Re: Unit testing log4j JMS Appender
I do not have time to dig deeper today, sorry. Maybe someone else will chirp in... Gary On Wed, Apr 2, 2014 at 1:40 PM, Mohit Anchlia mohitanch...@gmail.comwrote: It appears that the dependency jar is trying to use log4j 1. Do you have any suggestion on how I can resolve this issue? This is my new config and error follows that: ?xml version=1.0 encoding=UTF-8? Configuration status=warn name=MyApp packages= Appenders RollingFile name=search-indexer-async-log fileName=${mule.home}/logs/mule-search-indexer-async.log filePattern=logs/app-%d{MM-dd-}.log.gz PatternLayout Pattern[%d{MM/dd/ HH:mm:ss,SSS}] %-5p %c{3} [%t](%x): %m%n/pattern /PatternLayout TimeBasedTriggeringPolicy / SizeBasedTriggeringPolicy size=500 MB/ /RollingFile Async name=async blocking=false AppenderRef ref=search-indexer-async-log/ /Async JMSTopic name=search-indexer-async-jms-topic topicBindingName=indexTopicEndpoint factoryBindingName=ConnectionFactory providerURL=tcp://localhost:61616/ Async name=async-jms blocking=false AppenderRef ref=search-indexer-async-jms-topic/ /Async /Appenders Loggers Logger name=com.intuit.cfp.search.async additivity=false level=TRACE AppenderRef ref=async-jms/ /Logger Root level=error AppenderRef ref=async/ /Root /Loggers /Configuration SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/manchlia/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/manchlia/.m2/repository/org/apache/activemq/activemq-all/5.9.0/activemq-all-5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. log4j:WARN Continuable parsing error 2 and column 68 log4j:WARN Document root element Configuration, must match DOCTYPE root null. log4j:WARN Continuable parsing error 2 and column 68 log4j:WARN Document is invalid: no grammar found. log4j:ERROR DOM element is - not a log4j:configuration element. log4j:WARN No appenders could be found for logger (org.apache.activemq.broker.BrokerService). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. On Wed, Apr 2, 2014 at 10:12 AM, Gary Gregory garydgreg...@gmail.com wrote: The stack trace below shows the code trying to process an XML configuration with Log4j 1. You cannot have log4j version 1 on the classpath if you want to use version 2. The XML format between version 1 and 2 is different. Log4j 2 has a version 1 compatibility module you can use. Gary On Wed, Apr 2, 2014 at 1:07 PM, Mohit Anchlia mohitanch...@gmail.com wrote: I am trying to convert my log4.properties from 1.x to log4j.xml 2.0-rc1 but I am running into this issue log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender class=org.apache.log4j.appender.TimeAndSizeRollingAppender name=search-indexer-async param value=false name=BufferedIO / param value='.'-MM-dd name=DatePattern / param value=true name=DateRollEnforced / param value=${mule.home}/logs/mule-app-client-api.log name=file / param value=500MB name=MaxFileSize / param value=10 name=MaxRollFileCount / layout class=org.apache.log4j.PatternLayout param value=[%d{MM/dd/ HH:mm:ss,SSS}] %-5p %c{3} [%t](%x): %m%n name=ConversionPattern / /layout !-- Log entries that make it past this filter will be logged -- /appender appender name=async class=org.apache.log4j.AsyncAppender param name=BufferSize value=4096 / param name=blocking value=false / appender-ref ref=search-indexer-async / /appender appender name=search-indexer-async-jms class=org.apache.log4j.net.JMSAppender param name=InitialContextFactoryName value=org.apache.activemq.jndi.ActiveMQInitialContextFactory / param name=ProviderURL value=tcp://localhost:61616 / param name=TopicBindingName value=indexTopicEndpoint / param name=TopicConnectionFactoryBindingName value=ConnectionFactory / appender-ref ref=async / /appender log4j:WARN No such property [blocking] in org.apache.log4j.AsyncAppender. log4j:ERROR Could not create an Appender. Reported error follows. java.lang.ClassNotFoundException: org.apache.log4j.appender.TimeAndSizeRollingAppender at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at
Re: Unit testing log4j JMS Appender
I don't think there is any problem with that jar, the issue is that I am trying to use log4j 2 but the dependency jar that I am using is using log4j 1. When I switch back to log4j 1 everything works fine. Is there a way to avoid this compatibility issue? Not sure how others that have similar issue are able to migrate today to log4j 2 On Wed, Apr 2, 2014 at 4:48 PM, Remko Popma remko.po...@gmail.com wrote: The problem is in activemq-all-5.9.0.jar. I suggest you contact the activemq team. Sent from my iPhone On 2014/04/03, at 2:53, Gary Gregory garydgreg...@gmail.com wrote: activemq-all-5.9.0.jar - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: Unit testing log4j JMS Appender
SLF4J finds the two bindings below, but not the log4j2 binding ( *log4j-slf4j-impl-2.0.jar*). So first you need to add the log4j2 slf4j impl dependency. Second the classpath will still have the two jars below that also provide a binding. So whichever comes first in the classpath is the binding used by your app. Not ideal. I suggest removing the other bindings. Unfortunately, the activemq jar seems to bundle the binding in an all-in-one jar, making it hard to remove that binding. Perhaps activemq also provides a collection of component jars so you can exclude the slf4j binding... SLF4J: Found binding in [jar:file:/C:/Users/manchlia/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/manchlia/.m2/repository/org/apache/activemq/activemq-all/5.9.0/activemq-all-5.9.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] On Thursday, April 3, 2014, Mohit Anchlia mohitanch...@gmail.com wrote: I don't think there is any problem with that jar, the issue is that I am trying to use log4j 2 but the dependency jar that I am using is using log4j 1. When I switch back to log4j 1 everything works fine. Is there a way to avoid this compatibility issue? Not sure how others that have similar issue are able to migrate today to log4j 2 On Wed, Apr 2, 2014 at 4:48 PM, Remko Popma remko.po...@gmail.comjavascript:; wrote: The problem is in activemq-all-5.9.0.jar. I suggest you contact the activemq team. Sent from my iPhone On 2014/04/03, at 2:53, Gary Gregory garydgreg...@gmail.comjavascript:; wrote: activemq-all-5.9.0.jar - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.orgjavascript:; For additional commands, e-mail: log4j-user-h...@logging.apache.orgjavascript:;
RE: Unit testing log4j JMS Appender
You would be better served using version 2 which we are actively working on. Gary Original message From: Mohit Anchlia mohitanch...@gmail.com Date:04/01/2014 15:01 (GMT-05:00) To: Log4J Users List log4j-user@logging.apache.org Subject: Unit testing log4j JMS Appender I am trying to unit test log4j with jms appender, however even before I bring up the jms embedded broker service log4j.properties get loaded and it fails to connect to the broker. Is there a way to reload log4j after the broker is up?
Re: Unit testing log4j JMS Appender
Is there a stable version available? How do I reload configuration? I am using log4j.properties and not xml On Tue, Apr 1, 2014 at 12:09 PM, Gary Gregory garydgreg...@gmail.comwrote: You would be better served using version 2 which we are actively working on. Gary Original message From: Mohit Anchlia mohitanch...@gmail.com Date:04/01/2014 15:01 (GMT-05:00) To: Log4J Users List log4j-user@logging.apache.org Subject: Unit testing log4j JMS Appender I am trying to unit test log4j with jms appender, however even before I bring up the jms embedded broker service log4j.properties get loaded and it fails to connect to the broker. Is there a way to reload log4j after the broker is up?
Re: Unit testing log4j JMS Appender
On Tue, Apr 1, 2014 at 3:13 PM, Mohit Anchlia mohitanch...@gmail.comwrote: Is there a stable version available? Yes: https://logging.apache.org/log4j/2.x/ How do I reload configuration? Please see: - https://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticReconfiguration - https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/config/Reconfigurable.html#reconfigure() I am using log4j.properties and not xml Log4j 2 does not support properties files for configuration. It might one day, but not now. Gary On Tue, Apr 1, 2014 at 12:09 PM, Gary Gregory garydgreg...@gmail.com wrote: You would be better served using version 2 which we are actively working on. Gary Original message From: Mohit Anchlia mohitanch...@gmail.com Date:04/01/2014 15:01 (GMT-05:00) To: Log4J Users List log4j-user@logging.apache.org Subject: Unit testing log4j JMS Appender I am trying to unit test log4j with jms appender, however even before I bring up the jms embedded broker service log4j.properties get loaded and it fails to connect to the broker. Is there a way to reload log4j after the broker is up? -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Editionhttp://www.manning.com/bauer3/ JUnit in Action, Second Edition http://www.manning.com/tahchiev/ Spring Batch in Action http://www.manning.com/templier/ Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory