logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: Log4J log statements not working with RMI
Date Wed, 09 Sep 2009 15:55:33 GMT
Two things...

1.  You say you use "log.properties".  That won't get picked up automatically 
by Log4j.  It must be named "log4j.properties".  So, unless you are manually 
configuring Log4j at startup prior to invoking your RMI framework, then Log4j 
will remain unconfigured.

2.  You haven't provided any logger configuration, only appender 
configuration.  Assuming your configuration file is actually getting used, try 
defining the root logger at the DEBUG level until you determine logging is 
actually being performed, at which point you can change it to something more 
strict like WARN....

log4j.rootLogger=DEBUG, myAppender, myOtherAppender


Jake


On Wed, 9 Sep 2009 05:11:52 -0700 (PDT)
  ShivaVarma <shiva.varma@gmail.com> wrote:
> 
> To briefly sum up our configuration, we have a set of 20 java classes,
> grouped into 4 groups of 5 classes each.
> 
> Each group is registered with RMID, therefore there are 4 groups attached
> with the RMID, we call them as four RMI instances. The 4 RMI instances run
> parallely, thereby making the system faster.
> 
> The RMI instances are invoked during startup, and we have a manager java
> instance, that spawns and attaches the groups to RMID and invokes the
> classes on the groups
> 
> The problem being faced is that all the logs in the manager java instance
> get logged to file/stdout, but the logs in the 20 java classes do not
> logged, either to file or stdout.
> 
> The log.properties appender section looks like this
> 
> ################ APPENDERS #####################################
> log4j.appender.defaultAppender=org.apache.log4j.RollingFileAppender
> log4j.appender.defaultAppender.layout=org.apache.log4j.PatternLayout
> log4j.appender.defaultAppender.layout.ConversionPattern=%c{2}::%d - %m%n
> log4j.appender.defaultAppender.File=${log4j.logfile}
> log4j.appender.defaultAppender.Append=false
> log4j.appender.defaultAppender.MaxFileSize=10000KB
> log4j.appender.defaultAppender.MaxBackupIndex=5
> ################################################################
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%c{1} - %m%n
> ################################################################
> log4j.appender.simple_stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.simple_stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.simple_stdout.layout.ConversionPattern=%m%n
> ################################################################
> 
> Like Jacob, has suggested this could be a configuration problem, could you
> folks further help me understand/debug the problem
> 
> 
> 
> Jacob Kjome wrote:
>> 
>> What are the logger names and what is the configuration being used?  Keep
>> in 
>> mind, this is essentially *always* a configuration issue, not some new 
>> discovery of a flaw in Log4j.
>> 
>> Then again, are your logger statements occurring remotely?  In that case,
>> they 
>> would not log locally, but on the remote server where you made the remote
>> call 
>> to.  Is that the confusion here?
>> 
>> BTW, log4j-dev is not the appropriate list.  I'm moving this over to the
>> user 
>> list.
>> 
>> Jake
>> 
>> 
>> On Tue, 8 Sep 2009 04:09:15 -0700 (PDT)
>>   ShivaVarma <shiva.varma@gmail.com> wrote:
>>> 
>>> Hi
>>>  My RMI framework, spawns multiple classes, containing log4J log
>>> statements, however, none of these log statements get logged. Log4j
>>> statements outside of the RMI framework however get redirected to the
>>> file
>>> in the log.properties
>>>  Has anyone come across such similar situations, if so can you suggest me
>>> what else needs to be done, or if this is a known problem
>>> 
>>> Thanks
>>> Shiva
>>> 
>>> -- 
>>> View this message in context: 
>>>http://www.nabble.com/Log4J-log-statements-not-working-with-RMI-tp25344089p25344089.html
>>> Sent from the Log4j - Dev mailing list archive at Nabble.com.
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>> 
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
>> 
> 
> -- 
> View this message in context: 
>http://www.nabble.com/Re%3A-Log4J-log-statements-not-working-with-RMI-tp25350605p25363676.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message