Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 1004 - Log4j logging doesn't work anymore
Summary: Log4j logging doesn't work anymore
Status: CLOSED WORKSFORME
Alias: None
Product: JacORB
Classification: Unclassified
Component: ORB (show other bugs)
Version: 3.5
Hardware: PC Linux
: P5 major
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2015-03-13 07:37 UTC by na.ais40
Modified: 2015-03-17 08:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description na.ais40 2015-03-13 07:37:11 UTC
Hi,

We actualy use JacORB3.2 and the SLF4J log4j12 logging system.

the log4.properties is :

# par defaut niveau = WARN
#
log4j.rootLogger=WARN,sas,jsys

# définition des logs à inscrire dans le journal système
log4j.appender.jsys=sas.trace.serveur.TraceLog4JAppender
# définition du motif de sortie
log4j.appender.jsys.layout=org.apache.log4j.PatternLayout
log4j.appender.jsys.layout.ConversionPattern=%d %5p [%t] (%F\:%L) - %m%n

# définition des logs fichier du serveurs SAS
# Logs rotatifs
log4j.appender.sas=org.apache.log4j.RollingFileAppender
# Fichier destination
log4j.appender.sas.File=/home/opsnetv3/fichiers/log/opsnetv3/services.log
log4j.appender.sas.ImmediateFlush=true
# Nombre de fichiers de rotation (en plus du fichiers de log)
log4j.appender.sas.MaxBackupIndex=10
# Taille maximum avant rotation
log4j.appender.sas.MaxFileSize=100000KB
# définition du motif de sortie
log4j.appender.sas.layout=org.apache.log4j.PatternLayout
log4j.appender.sas.layout.ConversionPattern=%d %5p [%t] (%F\:%L) - %m%n

log4j.logger.jacorb=DEBUG,jacorb
log4j.additivity.jacorb=false
# Logs rotatifs
log4j.appender.jacorb=org.apache.log4j.RollingFileAppender
# Fichier destination
log4j.appender.jacorb.File=/home/opsnetv3/fichiers/log/orb/jacorb.log
log4j.appender.jacorb.ImmediateFlush=true
# Nombre de fichiers de rotation (en plus du fichiers de log)
log4j.appender.jacorb.MaxBackupIndex=10
# Taille maximum avant rotation
log4j.appender.jacorb.MaxFileSize=100000KB
# définition du motif de sortie
log4j.appender.jacorb.layout=org.apache.log4j.PatternLayout
log4j.appender.jacorb.layout.ConversionPattern=%d %5p [%t] (%F\:%L) - %m%n


This was working fine because in the jacorb.log file we have outputs like :

2015-03-13 11:14:09,191  INFO [main] (ORBSingleton.java:102) - created ORBSingleton
2015-03-13 11:14:09,237  INFO [main] (InterceptorManager.java:88) - InterceptorManager started with 2 Server Interceptors, 2 Client Interceptors and 0 IOR Interceptors
2015-03-13 11:14:09,803  INFO [main] (ClientConnectionManager.java:130) - ClientConnectionManager: created new ClientGIOPConnection to vsasdev4.dev.cy.cassidian.net:14200 (656e018a)
2015-03-13 11:14:09,827  INFO [main] (ClientIIOPConnection.java:169) - Connected to vsasdev4.dev.cy.cassidian.net:14200 from local port 46439

But since the migration to JacORB 3.6 the file remain empty
A test has been made with JacORB 3.4 with the same result.


It looks like a regression or we have missed a configuration option

Thanks for your assistance
Comment 1 Nick Cross 2015-03-13 08:02:15 UTC
I changed the hello demo to exclude slf4j-jdk14 and include slf4j-log4j12 and simplified your properties to be

--
log4j.rootLogger=DEBUG,jacorb
log4j.logger.jacorb=DEBUG,jacorb
log4j.additivity.jacorb=false
# Logs rotatifs
log4j.appender.jacorb=org.apache.log4j.RollingFileAppender
# Fichier destination
log4j.appender.jacorb.File=/tmp/jacorb.log
log4j.appender.jacorb.ImmediateFlush=true
# Nombre de fichiers de rotation (en plus du fichiers de log)
log4j.appender.jacorb.MaxBackupIndex=10
# Taille maximum avant rotation
log4j.appender.jacorb.MaxFileSize=100000KB
# définition du motif de sortie
log4j.appender.jacorb.layout=org.apache.log4j.PatternLayout
log4j.appender.jacorb.layout.ConversionPattern=%d %5p [%t] (%F\:%L) - %m%n

--

I passed the log4j.properties in via -Dlog4j.configuration=file:/tmp/log4j.properties and I got some output in /tmp/jacorb.log e.g.

2015-03-13 11:56:02,455 DEBUG [main] (ORBSingleton.java:199) - Set default native char codeset to UTF8



If you still have a problem please reopen and ideally provide a test case. Thanks.
Comment 2 na.ais40 2015-03-13 09:04:48 UTC
Not a BUG, my fault 

Configuration like this (.org append to logger name) :

log4j.logger.org.jacorb=DEBUG,jacorb
log4j.additivity.org.jacorb=false

instead of :
log4j.logger.jacorb=DEBUG,jacorb
log4j.additivity.jacorb=false