Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with log4j external configuration  RSS feed

venkatesh loganathan
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Iam not able to log messages to a file when i try to access log information froma file.I have a log4jconfig -- Logconfig.xml file like below
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="">

<appender name="cmeAppender"
<param name="File" value="Indentify-Log.txt"/>
<param name="Append" value="false"/>

<layout class="org.apache.log4j.PatternLayout"/>

<priority value="debug" />
<appender-ref ref="cmeAppender"/>


And my program which reads this file for logging goes like this

final Logger logger = Logger.getLogger(EditShopperAction.class);
logger.debug("Here is some DEBUG");"Here is some INFO");
logger.warn("Here is some WARN");
logger.error("Here is some ERROR");
logger.fatal("Here is some FATAL");


Both my xml and jav pgm are in the same path .Even then iam not able to record the log messages int oa file.

When not specified in external configuration its working fine (i.e programatically logging) .What could be the resaon for this.Can anybody help me out regarding this .Do i need to make any other entry in struts-config.xml etc...

Iam using xdoclet and ant for JBoss 3.2.4 server.

Thanks in advance

Venkatesh Loganathan
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems like your app server cannot find the configuration file in it to log something... I would suggest to consult with the documents available for JBoss Struts related stuff...

If you can log it programmatically, it won't be a big deal... You will find your answer in the manuals and documents of your application server...

Just my 2 cents...
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!