You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Priya K <pr...@yahoo.com> on 2002/09/18 01:30:47 UTC

Weblogic and log4j

Hi,

I am trying to use log4j in EJB's and was successful in send the log msg from the beans. But the problems is that the log msgs are not appearing in the output log files. 

But if,  I comment out the category so that all the log msgs go to rootlogger(i.e console ), I can see the msgs on the console.

Software:

Weblogic: 6.1 sp3

log4j: 1.26

Another question: Is there a way to know programmatically (in java class) if log4j has started successfully. Like I want to check the status of log4j startup and exit incase the startup has failed. 

Any help is greatly appreciated.

 

 

 



---------------------------------
Do you Yahoo!?
Yahoo! News - Today's headlines

RE: Appenders

Posted by sk k <sk...@yahoo.com>.
You will need to use the filters( LevelRangeFilter or
LevelMatchFilter) to send each level to a file.


Sample xml code to just log info levels:
      <filter
class="org.apache.log4j.varia.LevelRangeFilter">
         <param name="LevelMin" value="INFO" />
         <param name="LevelMax" value="INFO" />
         <param name="AcceptOnMatch" value="true" />
      </filter>


--- Johannes Carl�n <jo...@yahoo.com> wrote:
> Hi, I am using log4j with xml config files and want
> to
> accomplish these things but haven't been able to
> find
> out how. Could you point me to where you found info
> about this? I would really appreciate it!!
> 
> /Johannes
> 
>  --- sk k <sk...@yahoo.com> skrev: > 
> > Hi,
> > 
> > Thanks for the replies.
> > 
> > I did find some more info about the logging
> filters
> > and it seems that it can satisfy my requirements
> but
> > the only downside is, one needs to use xml config
> > files, which we don't do.
> > 
> > So my question: is there any effort to add this
> > feature to log4j for usage with ordinary config
> > files.
> >  
> 
>
_____________________________________________________
> Gratis e-mail resten av livet p� www.yahoo.se/mail
> Busenkelt!
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Appenders

Posted by Johannes Carlén <jo...@yahoo.com>.
Hi, I am using log4j with xml config files and want to
accomplish these things but haven't been able to find
out how. Could you point me to where you found info
about this? I would really appreciate it!!

/Johannes

 --- sk k <sk...@yahoo.com> skrev: > 
> Hi,
> 
> Thanks for the replies.
> 
> I did find some more info about the logging filters
> and it seems that it can satisfy my requirements but
> the only downside is, one needs to use xml config
> files, which we don't do.
> 
> So my question: is there any effort to add this
> feature to log4j for usage with ordinary config
> files.
>  

_____________________________________________________
Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Appenders

Posted by sk k <sk...@yahoo.com>.
Hi,

Thanks for the replies.

I did find some more info about the logging filters
and it seems that it can satisfy my requirements but
the only downside is, one needs to use xml config
files, which we don't do.

So my question: is there any effort to add this
feature to log4j for usage with ordinary config files.




--- Priya K <pr...@yahoo.com> wrote:
> 
> 
>  I don't think log4j allows you do this. 
> 
>  You will have to change the source code to satisfy
> your requirements.
> 
>  I wish, they had max and min threshold to set for
> each destination.
>  
>  Is there any we can have this feature considered
> for
> future releases.
> 
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Appenders

Posted by Priya K <pr...@yahoo.com>.

 I don't think log4j allows you do this. 

 You will have to change the source code to satisfy
your requirements.

 I wish, they had max and min threshold to set for
each destination.
 
 Is there any we can have this feature considered for
future releases.




__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Weblogic and log4j

Posted by sudhendra seshachala <su...@yahoo.com>.
 Another question: Is there a way to know
> programmatically (in java class) if log4j has
> started successfully. Like I want to check the
> status of log4j startup and exit incase the startup
> has failed. 

Use log4j.debug=true.
This will help a lot in ur case.

 U will need a console and File appender. check the
following snippet . this works.

# Copyright � 2000-2002 ePeople, Inc. All rights
reserved.
##
======================================================================
##
##                                                    
                   ##
##  Bootstrap Log4j Configuration                     
           ##
##                                                    
                   ##
##
======================================================================
##
# /properies/log4j.properties
# Author : Sudhi Seshachala

# uncomment this If you want to debug, how log4j is
configured.
log4j.debug=true


log4j.rootCategory=DEBUG,conquerConsole,conquerFile
log4j.com.epeople.utilities.Logger=DEBUG,conquerConsole,conquerFile

log4j.appender.conquerConsole=org.apache.log4j.ConsoleAppender
log4j.appender.conquerConsole.Threshold=DEBUG
log4j.appender.conquerConsole.layout=org.apache.log4j.PatternLayout
log4j.appender.conquerConsole.layout.ConversionPattern=%d{MM/dd/yyyy
HH:mm:ss a} [%t] [%p] %m%n

log4j.appender.conquerFile=org.apache.log4j.RollingFileAppender
log4j.appender.conquerFile.Threshold=DEBUG
log4j.appender.conquerFile.File=%JBOSS_DIST%/server/default/log/fooTrace.log
log4j.appender.conquerFile.MaxFileSize=100KB

# Keep one backup file
log4j.appender.conquerFile.MaxBackupIndex=10
log4j.appender.conquerFile.layout=org.apache.log4j.PatternLayout
log4j.appender.conquerFile.layout.ConversionPattern=%d{MM/dd/yyyy
HH:mm:ss a} [%t] [%p] %m%n

log4j.logger.Logger=DEBUG
log4j.additivity.com.foo.utilities.Logger=false









--- Priya K <pr...@yahoo.com> wrote:
> 
> Hi,
> 
> I am trying to use log4j in EJB's and was successful
> in send the log msg from the beans. But the problems
> is that the log msgs are not appearing in the output
> log files. 
> 
> But if,  I comment out the category so that all the
> log msgs go to rootlogger(i.e console ), I can see
> the msgs on the console.
> 
> Software:
> 
> Weblogic: 6.1 sp3
> 
> log4j: 1.26
> 
> Another question: Is there a way to know
> programmatically (in java class) if log4j has
> started successfully. Like I want to check the
> status of log4j startup and exit incase the startup
> has failed. 
> 
> Any help is greatly appreciated.
> 
>  
> 
>  
> 
>  
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! News - Today's headlines


=====
God Bless America

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>