• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jboss-log4j.xml category question

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rácz György
Greenhorn
Posts: 19
 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic