Bonjour,
Je souhaite récupérer les logs de mon application dans un fichier, pour ce faire j'ai déclaré le fichier log4j.properties comme suit
Je n'ai jmais de fichier bplh.log de créer. Par contre un fichier localhost_access est mis à jour.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 # configuration du logger pour le projet log4j.logger.bplh=DEBUG, APPLI_CONSOLE, APPLI_ROLLINGFILE # limit logging of frameworks classes log4j.logger.org.apache = DEBUG #console appender log4j.appender.APPLI_CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.APPLI_CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.APPLI_CONSOLE.layout.ConversionPattern=%p [%t] %c{2} - %m%n log4j.appender.APPLI_CONSOLE.threshold = WARN # rolling file appender log4j.appender.APPLI_ROLLINGFILE=org.apache.log4j.RollingFileAppender log4j.appender.APPLI_ROLLINGFILE.File=C:\\appli.log log4j.appender.APPLI_ROLLINGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.APPLI_ROLLINGFILE.layout.ConversionPattern=%p [%t] %c{2} - %m%n # Set the max size of the file and the number of backup files log4j.appender.APPLI_ROLLINGFILE.MaxFileSize=100KB
Pour aller plus loin, on dirait que mes propriétés log4j ne sont pas pris en compte du tout, et que c'est seulement les logs de la jvm que je vois.
Merci.
Partager