I am currently working on a simple web application using javalite webactive and activeJDBC. To start with javalite I simply used https://github.com/javalite/activeweb-simple/ and expanded from there.
One thing which I would like to change, now that I have already implemented a few controllers and models I want to customize the logger:
[qtp1442407170-13] INFO org.javalite.activeweb.RequestDispatcher - {"controller":"app.controllers.HomeController","duration_millis":685,"remote_ip":"0:0:0:0:0:0:0:1","method":"GET","action":"index","url":"http://localhost:8080/home/index","status":200}
.
I don't really get what the prefix represents hence I would like to change that part to show date and timestamps.
Following http://javalite.io/logging#log4j-configuration I should be able to customize the logging via log4j.properties
in src/main/resources
, but this does not seem to make any difference.
The files content:
log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %4p %c{1} - %m%n
I suspect that I have somehow overwritten the default logger, although I did not change anything related in the pom.xml
or Main.java
.
Am I missing something or could it be that the changes somehow get overwritten?