Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes Using your own log4j.properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Using your own log4j.properties file" Watch "Using your own log4j.properties file" New topic
Author

Using your own log4j.properties file

Ravi
Greenhorn

Joined: Jan 16, 2007
Posts: 3
http://www.jboss.org/wiki/Wiki.jsp?page=Logging

Using your own log4j.properties file - class loader scoping


i followed above URL.

in default/conf directory i renamed log4j.xml to jboss-log4j.xml;and in jboss-service.xml i changed log4j.xml to jboss-log4j.xml;

i want to use my own log4j.properties and it is placed in WEB-INF of test.war directory;

log4j1.2.4.jar placed in WEB-INF/lib directory.i made changes in jboss-web.xml.

<class-loading java2ClassLoadingCompliance='false'>
<loader-repository>test:loader=test.war<loader-repository-config>java2ParentDelegaton=false</loader-repository-config>
</loader-repository>
</class-loading>

log4j.properties


og4j.category.app=info, SESSME
log4j.appender.SESSME=org.apache.log4j.RollingFileAppender
log4j.appender.SESSME.File=${jboss.server.home.dir}/log/std.log
log4j.appender.SESSME.MaxFileSize=5120KB
# Keep ten backup files
log4j.appender.SESSME.MaxBackupIndex=10
log4j.appender.SESSME.layout=org.apache.log4j.PatternLayout
log4j.appender.SESSME.layout.ConversionPattern=%d , %m%n


i have one doubt should i write any java file to read log4j.properties that i placed in WEB-INF directory or else jboss will automatically read log4j.properties file

But still it is logging in to server.log ................
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

"Ravi",

You have previously been warned on one or more occasions regarding adjusting your display name to meet JavaRanch standards. This is not optional. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it prior to your next post.

Your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ravi
Greenhorn

Joined: Jan 16, 2007
Posts: 3
I could nt understand why the hell R U making....Why couldnt I have my own display Name ,if not why did U gave an option of entering the Display Name during the registration process if display Name is merely a First Name and Last NAme seperated by a space!!! This could have been automatically generated by displayName=firstName +" "+ lastName

This is really funny to hear that U guys are so crazy about Display Name rather than concentrate on other Issues.. The Display Name which I had given is not any obscene one.. so why this nonsense..

A policy should be a bit meaningful.... like no obscene words usage or non usage of celebrities etc.,., Not like FiratName only cannot be Used and so on...blah blah......
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

It is because we believe that real names contribute to a friendlier and more professional community. If you would like to discuss our display name policy, you can do so in this thread: Discussion of Naming Policy but you will need to register with a new account as I am closing this one

thanks,
Dave
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60071
    
  65

When and if you begin posting using your new account with a valid display name, please be sure to use real words when posting. R and U are not real words. Please use "are" and "you". Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using your own log4j.properties file
 
Similar Threads
using log4j in jsr portlets
log4j.properties in jboss4.0.3
Loading different version of Hibernate(3.3) in Jboss4.0.3
Logging in JBoss 4.0.1
three day headache - ClassCastException