Skip to content

Commit

Permalink
replace javaAgent by JOL
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérémy Lieugard committed Apr 10, 2020
2 parents a903305 + 4bcb92b commit f51b709
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
8 changes: 0 additions & 8 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.4.0] - 2018-06-05
### Changed
- Mise à jours des versions des librairies
* spring 1.5.6 -> 1.5.9
* logback-encoder 4.7 -> 5.1
- Ajout de deux threads mdc pour améliorer le diagnostic ('threadMDC1', 'threadMDC2')
- Changement de la façon d'ajouter les appenders en fonction des profils spring

## [1.3.0] - 2018-03-15
### Changed
- Activation de l'autoconfiguration pour le bean LogMetierService
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ dependencies {
compile 'org.springframework.boot:spring-boot-starter:2.0.8.RELEASE'
compile 'org.openjdk.jol:jol-core:0.10'
testCompile 'org.springframework.boot:spring-boot-starter-test:2.0.8.RELEASE'

}

task createPom {
Expand Down
15 changes: 10 additions & 5 deletions src/main/resources/nc/opt/core/logging/logs-defaults.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<property name="CONSOLE_LOG_PATTERN" value="%date{ISO8601} [%thread] [%-5level]%mdc{threadMDC1}%mdc{threadMDC2} %logger{200} - %msg%n" />

<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>

<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>

<springProfile name="prod">
<springProfile name="!dev">
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<Pattern>%date{ISO8601} [%thread] [%-5level] %logger{200} - %msg%n</Pattern>
</layout>
<file>${LOG_FILE}</file>
<append>true</append>
Expand All @@ -28,9 +26,16 @@
</root>
</springProfile>

<springProfile name="!prod">
<springProfile name="dev">
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>

<springProfile name="DEV">
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>

</included>
12 changes: 10 additions & 2 deletions src/main/resources/nc/opt/core/logging/logs-metiers.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProfile name="prod">

<springProfile name="!dev">
<appender name="METIERS" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder class="net.logstash.logback.encoder.LogstashEncoder"/>
<file>${LOG_FILE_JSON}</file>
Expand All @@ -19,9 +20,16 @@
</springProfile>


<springProfile name="!prod">
<springProfile name="dev">
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>

<springProfile name="DEV">
<root level="INFO">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>

</included>

0 comments on commit f51b709

Please sign in to comment.