Commit 2c6c84d0 authored by Dr. Martin Goik's avatar Dr. Martin Goik

quickstart archetype having log4j.properties

parent 518678e0
......@@ -20,6 +20,12 @@
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
<build>
......
package $package;
import org.apache.log4j.Logger;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
public class App {
private static Logger log = Logger.getLogger(App.class);
public static void main( String[] args ) {
System.out.println( "Hello World!" );
log.debug("You may want to configure file log4j.properties");
log.debug("in folder resources to suit your needs.");
}
}
#Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout comforting Eclipse's debugger.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%p: %m at %c.%M(%C{1}.java:%L)%n
# Specific log level per-class/package rules
#log4j.logger.somepackage.parse.Group=INFO
......@@ -32,7 +32,6 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.33</version>
</dependency>
</dependencies>
......
......@@ -7,7 +7,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collection;
import java.util.Set;
import org.apache.log4j.Logger;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment