[CLIENT] #6.A : Ajout de log4j dans les dépendances du projet client; Ajout d'un fichier de config log4j2.xml aux ressources

This commit is contained in:
Notmoo-PC\Notmoo 2018-01-25 17:46:29 +01:00
parent 2123843247
commit 67da2c5109
3 changed files with 31 additions and 0 deletions

View File

@ -13,5 +13,7 @@
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="core" /> <orderEntry type="module" module-name="core" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.1" level="project" /> <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.10.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.10.0" level="project" />
</component> </component>
</module> </module>

View File

@ -16,6 +16,19 @@
<artifactId>core</artifactId> <artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<!-- Dépendances core et api de log4j (API de logging) -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.10.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="trace">
<AppenderRef ref="Console"/>
</Root>
<Logger name="com.pqt.client" level="trace" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
</Loggers>
</Configuration>