File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jboss-log4j.xml category question

 
Rácz György
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All!

Sorry for my bad english!

I am writing simple JSP portlet application, i want to log the details. So i am using the log4j which is in jboss/server/default/conf folder.
The content of jboss-log4j.xml is as follows:



I have inserted a appender and a category (com.geosoft) in the jboss-log4j.xml, but after server started still my data are logged to the console
not in liferay.log file.



After i modified jboss-log4j.xml (insert some enter), i am finding that it is hanging on the line below (via the console):
14:46:49,308 INFO [Log4jService$URLWatchTimerTask:599] Configuring from URL: resource:jboss-log4j.xml

Then liferay.log and server.log file is cleared and WORKS FINE (contains this):



I think that, when start jboss as, doesn't load jboss-log4j.xml fully...

Please help me to solve this....

Thanks for you help
Geo
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rácz,

Please do not modify jboss-log4j.xml. This xml file is for JBoss logging. If you want your application to use log4j please make a separate configuration file and add it into your jar/ear. In your configuration file you can specify the log file name as well as its location. Hope this helps.
 
Rácz György
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi uttam kumar!

I am using Liferay 5.2 SP4 bundled with JBoss. I think my problem is that, JBoss doesn't picked up correctly my jboss-log4j.xml.

<category name="com.geosoft">
<priority value="WARN" />
<appender-ref ref="LIFERAY"/>
</category>

But if i modify the jboss-log4j.xml, the category settings load correctly, and works. It works only modify the .xml file. Why?

You think, if i create log4j.properties every portlet, the log messages is write correctly the liferay.log or server.log?

Thanks for you help
Geo
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic