Hi,
I tried to configure log4.properties in my standalone application, it shows
on console but i am unable to see it in file, following is my code
Main Class:-
public static void main(String[] args) throws Exception {
Main main = new Main();
main.enableHangupSupport();
main.addRouteBuilder(new TestLogRoute());
main.run();
} //EO main
TestLogRoute Class:-
public void configure() throws Exception {
from("timer://foo?delay=0&period=20000")
.log(LoggingLevel.INFO,"Log Configured MT ${body}");
}
Following is my log4j.properties under com.my.test.resources
log4j.rootLogger=info, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{dd-MMM-yyyy HH:mm:ss:SSS}
%5p [%t] - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=d:\\logs\\testlogs.log
log4j.appender.R.MaxFileSize=15000KB
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %5p [%t] - %m%n
Regards,
--
View this message in context:
http://camel.465427.n5.nabble.com/Log4j-in-Camel-Standalone-Application-tp5750730.html
Sent from the Camel - Users mailing list archive at Nabble.com.