Hello all, Thanks for hosting a great forum. I have scoured this forum for the answer to this question, and while there seem to be many logging- and log4j-related questions and answers, I have been unable to figure out how to do what I'm trying to do, which is to add timestamps to the maven console output.
For example, I want this: [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ to look instead like this: [2008-03-14 11:20:03,312 INFO] ------------------------------------------------------------------------ [2008-03-14 11:20:03,312 INFO] BUILD SUCCESSFUL [2008-03-14 11:20:03,312 INFO] ------------------------------------------------------------------------ The reason for wanting this is that we are trying to tune our build and measure our success by looking at the time each build step takes. My understanding is that maven uses log4j/commons-logging, both of which I'm familiar with. I then tried to plug a custom log4j.properties into the right location on the classpath to achieve what I wanted. I tried setting the following on both command-line and by altering MAVEN_OPTS in mvn.bat: -Dlog4j.debug=true -Dlog4j.configuration=file:/c:/log4j.properties Neither approach has any effect--I get no log4j debug information, and my properties file is ignored. I also tried putting the log4j.properties in the current directory of the build--this doesn't work either. Nothing I did seemed able to trigger log4j debug info, making me suspicious as to whether log4j was even in use. I took a quick glance at the maven source code, but was unsuccessful in locating the logging module to try and trace how the log configuration is initialized. Anybody know how to customize the "layout" of the maven console output? Thanks in advance for any pointers. --Ryan P.S. Just to avoid any off-topic responses, note that my junit test output is correctly using a custom log4j.properties (from test/resources, etc.). However, this is not my objective--I'm trying to customize all maven console output. -- View this message in context: http://www.nabble.com/getting-timestamps-in-console-logging-output-tp16048940s177p16048940.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
