g4jna.log4jna-demo.2.0.source-code.log4j2.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <Configuration status="TRACE"> <Properties> <!-- | | Win32EventLogAppender.dll location. | | Use this configuration to use the dll from your local Maven repository | | 1 - Add or uncomment the dll dependency in your pom file using the following dependency declaration. | | <dependency> | <groupId>org.apache.log4jna</groupId> | <artifactId>Win32EventLogAppender</artifactId> | <version>2.0</version> | <type>dll</type> | </dependency> | | 2 - Uncomment the property | 3 - Replace <%userprofile%> with your actual local maven repository location. | 4 - Perform the required modifications in you registry using regedit. | --> <!-- Property name="dllfile"> <%userprofile%>\.m2\repository\org\apache\log4jna\Win32EventLogAppender\2.0\Win32EventLogAppender.dll </Property --> <!-- | Use this configuration to use the dll from the test resources directory | 1 - Uncomment the property | 2 - Replace <workspace> with the actual directory of your project workspace | --> <!-- Property name="dllfile"> <workspace>\src\test\resources\Win32EventLogAppender.dll </Property --> <Property name="dllfile">src\test\resources\Win32EventLogAppender.dll</Property> </Properties> <Appenders> <Console name="console-log" target="SYSTEM_OUT" level="debug"> <PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %l - %msg%n" /> </Console> <Win32EventLog name="Win32EventLog" source="DemoLogger1" application="Win32LogApplication" eventMessageFile="${dllfile}" categoryMessageFile="${dllfile}"> <PatternLayout pattern="%-5p [%t] %m%n" /> </Win32EventLog> </Appenders> <Loggers> <Root level="trace"> <appender-ref ref="Win32EventLog" /> <appender-ref ref="console-log" /> </Root> </Loggers> </Configuration>