Revision ad18cde1
Added by Andreas Müller over 1 year ago
cdmlib-commons/src/main/resources/log4j.xml2 | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<Configuration> |
|
3 |
<Appenders> |
|
4 |
<File name="FILE" fileName="cdmlib-commons.log" append="true" header="%d{dd MMM yyyy}"> |
|
5 |
<PatternLayout pattern="%d{ABSOLUTE} %5p %c{1}:%L - %m%n"/> |
|
6 |
</File> |
|
7 |
<Console name="STDOUT" target="SYSTEM_OUT"> |
|
8 |
<PatternLayout pattern="%d{ABSOLUTE} %5p %c{1}:%L - %m%n"/> |
|
9 |
</Console> |
|
10 |
</Appenders> |
|
11 |
<Loggers> |
|
12 |
<Root level="warn"> |
|
13 |
<!-- <AppenderRef ref="STDOUT"/> --> |
|
14 |
<AppenderRef ref="FILE"/> |
|
15 |
</Root> |
|
16 |
<Logger name="org.hibernate.orm.deprecation" level="error" additivity="false"> |
|
17 |
<AppenderRef ref="FILE"/> |
|
18 |
</Logger> |
|
19 |
</Loggers> |
|
20 |
</Configuration> |
cdmlib-test/src/main/java/eu/etaxonomy/cdm/test/unitils/DdlCreator.java | ||
---|---|---|
51 | 51 |
protected static final Logger logger = LogManager.getLogger(); |
52 | 52 |
|
53 | 53 |
public static void main(String[] args) { |
54 |
try { |
|
55 |
logger.error("Java version: " + System.getProperty("java.version")); |
|
56 |
System.setSecurityManager(null); //avoids security exception when started by ant (problem is the jmx server registration by log4j2, similar issue is described at https://stackoverflow.com/questions/12195868/java-security-accesscontrolexception-when-using-ant-but-runs-ok-when-invoking-j ) |
|
57 |
new DdlCreator().execute(H2CorrectedDialectTest.class, "h2"); |
|
54 |
try { |
|
55 |
System.out.println("Java version: " + System.getProperty("java.version")); |
|
56 |
System.setSecurityManager(null); //avoids security exception when started by ant (problem is the jmx server registration by log4j2, similar issue is described at https://stackoverflow.com/questions/12195868/java-security-accesscontrolexception-when-using-ant-but-runs-ok-when-invoking-j ) |
|
57 |
} catch (Exception e1) { |
|
58 |
e1.printStackTrace(); |
|
59 |
} |
|
60 |
|
|
61 |
try { |
|
62 |
new DdlCreator().execute(H2CorrectedDialectTest.class, "h2"); |
|
58 | 63 |
} catch (Exception e) { |
59 | 64 |
e.printStackTrace(); |
60 | 65 |
} |
Also available in: Unified diff
further changes for debugging