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 Thu, 10 Sep 2009 20:20:58 GMT
1.  Does anything log to the simple_stdout appender?  Have you tried another 
one that does get logged to, such as stdout?

2.  How is your logger defined in SupplyChainAdaptor?  Are you positive about 
the logger name?  Might it not be named after the fully qualified class name 
as your are expecting?

3.  What exactly do you mean "Logs from SupplyChainAdaptor attached to RMID do 
no get logged"?  Specifically, I't's not clear to me what the "attached to 
RMID" part means?  Please explain.  Might it make a difference how the logger 
is used?  That is, is it used in an object being sent remotely so that the 
logger.log("something") statement doesn't actually get called in the current 
VM, but in a remote one?  That would explain your lack of logging.


Jake


On Wed, 9 Sep 2009 22:40:44 -0700 (PDT)
  ShivaVarma <shiva.varma@gmail.com> wrote:
> 
> 1. Yes I have manually configured Log4j to pick up log.properties
> 
> 2. Here is the complete log.properties file for reference
> log4j.rootLogger=DEBUG, defaultAppender
> DefaultPriority=DEBUG
> StackDEBUGThreshold=DEBUG
> 
> ################ 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
> ################################################################
> 
> ########### Manipulate the TEST log outputs #####################
> log4j.logger.com.r2.test.TMTESTApplicationManager=DEBUG,simple_stdout
> log4j.logger.com.r2.test.AdaptorManager=DEBUG,stdout
> log4j.logger.com.r2.test.AdapterManagerBase=DEBUG,stdout
> log4j.logger.com.r2.test.SimpleXMLParser=DEBUG,stdout
> log4j.logger.com.r2.test.AdaptorInterfaceFactory=DEBUG,stdout
> log4j.logger.com.r2.test.AdapterManagerBase=DEBUG,stdout
> log4j.logger.com.r2.test.SupplyChainAdaptor=DEBUG,simple_stdout
> 
> ######### Filter unwanted logistics API log messages
> log4j.logger.com.r2.logistics=DEBUG
> log4j.logger.com.r2.logistics.util.propertyarray=DEBUG
> log4j.logger.com.r2.odsdb=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.JDBCUtil=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.StatementUtil=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.StatementUtil2=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.BeanWriter2=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.BeanPopulator=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.ResultSetAccessorObject=DEBUG
> log4j.logger.com.r2.logistics.util.xmlimport.DataSetImpl=DEBUG
> log4j.logger.com.r2.logistics.util.xmlimport.XMLDataSetParser=DEBUG
> log4j.logger.com.r2.logistics.util.xmlimport.TagTypeParserMap=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.dataimport.EntityTransformer=ERROR
> log4j.logger.com.r2.logistics.util.jdbc.dataimport.ForeignKeyLookupTableXMLImporter=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.dataimport.ForeignKeyResolver=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.metadata.MetaDataUtil=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.metadata.ForeignKeyDefinition=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.metadata.TableDefinitionCatalog=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.dataimport.EntityMappingXMLImporter=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.dataimport.Importer=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.dataimport.DataInserter=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.dataimport.DataInserterBatch=DEBUG
> log4j.logger.com.r2.logistics.util.jdbc.oracle.OracleHelper=DEBUG
> log4j.logger.com.r2.logistics.util.ExceptionHandlerCollection=DEBUG
> log4j.logger.com.r2.logistics.util.ExceptionHandlerCounter=DEBUG
> log4j.logger.com.r2.logistics.util.thread.ThreadQueue=DEBUG
> log4j.logger.com.r2.logistics.util.ReflectionHelper=DEBUG
> 
> ############# Filter unwanted CIS API log messages
> ########################333
> log4j.logger.com.r2.cis.util.logger.outputmessage=WARN
> log4j.logger.com.r2.cis.util.launcher=WARN
> log4j.logger.com.r2.cis.xml=WARN
> log4j.logger.com.r2.cis.util=WARN
> log4j.logger.com.r2.cis.util.DateUtil=WARN
> log4j.logger.com.r2.cis.util.FileUtil=WARN
> log4j.logger.com.r2.cis=WARN
> 
> 
> To point out the problem being faced
> log4j.logger.com.r2.test.AdapterManagerBase=DEBUG,stdout  >> Logs from
> AdaptorManagerBase get logged
> log4j.logger.com.r2.test.SupplyChainAdaptor=DEBUG,simple_stdout >> Logs from
> SupplyChainAdaptor attached to RMID do no get logged.
> 
> 
> 
> Jacob Kjome wrote:
>> 
>> 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
>> 
>> 
>> 
> 
> -- 
> View this message in context: 
>http://www.nabble.com/Re%3A-Log4J-log-statements-not-working-with-RMI-tp25350605p25377596.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