ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » log files are not created by LOG4J

Post new topic  Reply to topic
 log files are not created by LOG4J « View previous topic :: View next topic » 
Author Message
amiivas
PostPosted: Tue Dec 11, 2007 5:04 am    Post subject: log files are not created by LOG4J Reply with quote

Apprentice

Joined: 14 Oct 2007
Posts: 44
Location: Texas, USA

Hi,
Log files are not created by using log4j feature.In the log4j.properties file I am giving the following code:
log4j.rootCategory=DEBUG, R, O
# Stdout
log4j.appender.O=org.apache.log4j.ConsoleAppender
# File
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=log4j.log
# Control the maximum log file size
log4j.appender.R.MaxFileSize=100KB
# Archive log files (one backup file here)
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.O.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%d{ISO8601}]%5p%6.6r[%t]%x - %C.%M(%F:%L) - %m%n
log4j.appender.O.layout.ConversionPattern=[%d{ISO8601}]%5p%6.6r[%t]%x - %C.%M(%F:%L) - %m%n

and in the .class file I have given:
Logger lg = Logger.getLogger(PoC_JAVA_DB.class);
lg.info("Entering application");
lg.debug("Errors");
lg.info("Exiting application");

How to solve this problem,
Thanks,
Amit
Back to top
View user's profile Send private message
amiivas
PostPosted: Tue Dec 11, 2007 10:03 pm    Post subject: Issue solved Reply with quote

Apprentice

Joined: 14 Oct 2007
Posts: 44
Location: Texas, USA

Hi ,
The issue has been solved for the time being as I was trying it for a message flow project in which I was using a JCN and trying to log it from the java code used in JCN.
I tried with the pure JAVA project and it created.
But I wonder Log files must be created from the message flow / message set project using JCN. Can anyone help me on this thing.
Thanks,
Amit
Back to top
View user's profile Send private message
jsware
PostPosted: Wed Dec 12, 2007 1:08 am    Post subject: Re: Issue solved Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

Try specifying an absolute path in the log4j properties file on your rolling file appender, the file might be created, just not in the location you expected.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
Back to top
View user's profile Send private message
amiivas
PostPosted: Tue Jan 01, 2008 11:39 pm    Post subject: Reply with quote

Apprentice

Joined: 14 Oct 2007
Posts: 44
Location: Texas, USA

The problem is :
The file is not created while we are using the JAVA code in a message flow project.(I am also defining the absolute path)
so,is it possible to create the log file by deploying the message flow project and running the flow in which the JCN is used.
Back to top
View user's profile Send private message
jharringa
PostPosted: Wed Jan 16, 2008 3:17 pm    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

I am successfully using log4j in a JCN within a message flow without issues. We are specifying an abolute path in our properties file.

Is this line:

Code:
log4j.rootCategory=DEBUG, R, O


supposed to be:

Code:
log4j.rootLogger=DEBUG, R, O


I hope that helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » log files are not created by LOG4J
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.