Hi,

Sorry for delayed reply.

You need to create a Category like :

  <category name="com.xxxcxc.yyyyy"> --- Your package hier.
    <priority value="DEBUG"/> -- the level of logging you want to enable
  </category>

Then you need to use either default appenders (Console and File) or
You can have your own. Refer to log4j.xml. 

If you want to get the LOG msg. in your FILE Appender then
You may have to change the "Threshold" value to your "Priority"
value,say, Debug.
And NEED to change "Append" to "true".

EXAMPLE:

 <!-- A time/date based rolling appender -->
  <appender name="FILE"
class="org.jboss.logging.appender.DailyRollingFileAppender">
    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
    <param name="Append" value="true"/>
    <param name="Threshold" value="DEBUG"/>

HTH,
Saroj

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of linuxman
Sent: Sunday, November 24, 2002 7:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] log4j and jboss: where is log4j.properties?


Thanks first!

Yes, I noticed that in $JBOSS_HOME/server/default/conf, there is 
log4j.xml, then you mean, I can use this default properties for my jboss

application deployed in $JBOSS_HOME/server/default/deploy?

But my test application run correctly, just say nothing:-), not log to 
log/server.log. Here is some snippits of my code:

static Logger logger = Logger.getLogger(UserInfoBean.class.getName());
......
logger.debug( "UserInfoBean: entering ejbCreate");
....

You see, very simple.

It seemed that, my looger can not find jboss's log4j.xml. Must I use 
PropertyConfigrator to load log4j.xml? I don't think so. I just want to 
use the default one that jboss give me:-). But how to?

Any hints?

Thanks in advance!


saroj kumar ??:

>Hi,
>
>You can configure your log4j.xml in JBOSS_HOME\conf
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]] On Behalf Of linuxman
>Sent: Saturday, November 23, 2002 9:40 PM
>To: jboss ml
>Subject: [JBoss-user] log4j and jboss: where is log4j.properties?
>
>
>hi,
>
>I want to use apache log4j in my jboss j2ee application, but where 
>should I put log4j.properties? which directory?
>
>thanks in advance!
>
>linuxman
>
>
>
>  
>





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to