Newbie help

2002-10-10 Thread Kwok Peng Tuck

I'm trying to get my jsp to work with log4j, I need to know how to set 
up the log4j properties file to log to a file.
Can someone provide a example ? Thanks.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Finding Appenders

2002-10-10 Thread sk k


About JMX:

I was able to get both RI from Sun and MX4j server up
and running using the JMX capablities exposed by
log4j.

Since, MX4j is actively developed and maintained, you
can take a look at it. It has some bugs but it seems
to get the work done at least for me since, I wanted
some simple JMX support.



--- Greg Cutler <[EMAIL PROTECTED]> wrote:
> 
> --- Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> > This problem has been mentioned several times. We
> > will address the issue in 
> > log4j 1.3.
> > 
> > At 13:39 09.10.2002 -0700, you wrote:
> > >I've been working on a small struts application
> > that
> > >can "plug in" to existing webapps to
> view/configure
> > >log4j at runtime. The LogManager (and underlying
> > >LoggerRepository/Heirarchy) API gives an easy way
> > to
> > >retreive all loggers currently instantiated, but
> I
> > am
> > >missing something similar for Appenders.
> 
> Thanks. I'll look forward to it!
> 
> > >P.S. if there are any other lightweight, webapp
> > based
> > >realtime log4j administration tools out there,
> i'd
> > >love to know about them. thx
> 
> Any ideas on this front? I've seen a bit of the JMX
> stuff, but haven't dug into either JMX or the log4j
> implementation, but think that's a bit on the heavy
> side for my needs anyway. Anything else out there
> for
> web-based log4j management?
> 
> thanks,
> Greg
> 
> __
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Finding Appenders

2002-10-10 Thread Greg Cutler


--- Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> This problem has been mentioned several times. We
> will address the issue in 
> log4j 1.3.
> 
> At 13:39 09.10.2002 -0700, you wrote:
> >I've been working on a small struts application
> that
> >can "plug in" to existing webapps to view/configure
> >log4j at runtime. The LogManager (and underlying
> >LoggerRepository/Heirarchy) API gives an easy way
> to
> >retreive all loggers currently instantiated, but I
> am
> >missing something similar for Appenders.

Thanks. I'll look forward to it!

> >P.S. if there are any other lightweight, webapp
> based
> >realtime log4j administration tools out there, i'd
> >love to know about them. thx

Any ideas on this front? I've seen a bit of the JMX
stuff, but haven't dug into either JMX or the log4j
implementation, but think that's a bit on the heavy
side for my needs anyway. Anything else out there for
web-based log4j management?

thanks,
Greg

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: LevelMatchFilter ???

2002-10-10 Thread Mark Womack

1) Filters are only configurable using xml configuration files, not property
configuration files.

2) You can also look at using LevelRangeFilter.  It allows a range of levels
(ie INFO thru WARN) to be excluded/included.  Configuration is similar to
LevelMatchFilter; see the javadoc for allowed properties.

The original message is a bit confusing.  I am assuming that "text
properties files" is actually referring to the output log file.

hth,
-Mark

> -Original Message-
> From: sk k [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 09, 2002 9:24 PM
> To: Log4J Users List
> Subject: Re: LevelMatchFilter ???
> 
> 
> IMHO, there is no way to exclude some random log
> levels using txt prop files but you can do that using
> xml config files.
> 
> Here is the sample that needs to be enclosed within an
> appender tag.
> 
>class="org.apache.log4j.varia.LevelMatchFilter">
>  
>  
>
> 
> 
> --- NickPhilia Nguyen <[EMAIL PROTECTED]> wrote:
> > It seems that I can use LevelMatchFilter to exclude
> > unwanted log level(s) in text properties files .
> > Anybody has an example of this or show me how to use
> > it?
> > 
> > Thanks
> > 
> > =
> > Silence is the true friend that never betrays. --
> > Confucius
> > 
> > __
> > Do you Yahoo!?
> > Faith Hill - Exclusive Performances, Videos & More
> > http://faith.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:  
> > 
> > For additional commands, e-mail:
> > 
> > 
> 
> 
> __
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Release of log4j 1.2.7

2002-10-10 Thread sk k


Thanks for the reply.

--- Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> 
> Subclassing the Logger class is highly discouraged.
> You should try wrapping 
> instead of subclassing.
> 
> At 18:54 09.10.2002 -0700, you wrote:
> 
> >Can you pls add the functionality to the next
> release
> >to allow DOMConfigurator to recognize the
> >categoryFactory tag, so that extending log4j to
> >support other levels can be easy.
> >
> >It seems that only PropertyConfigurator supports
> the
> >proper extension of levels without throwing
> >ClassCastException.
> >
> >I have posted regarding this, couple of times on
> this
> >message board but haven't heard anything.
> >
> >Can somebody pls explain?
> >
> >
> >
> >
> >--- Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> > >
> > > Greetings,
> > >
> > > Log4j developers are happy to announce the
> release
> > > of log4j 1.2.7. As
> > > of this release log4j will search for the file
> > > log4j.xml as well as
> > > the file log4j.properties during its
> initialization.
> > >
> > > You can download log4j version 1.2.7 at
> > >
> > >
> http://jakarta.apache.org/log4j/docs/download.html
> > >
> > > --
> > > Ceki Gülcü
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> 
> > > For additional commands, e-mail:
> > > 
> > >
> >
> >
> >__
> >Do you Yahoo!?
> >Faith Hill - Exclusive Performances, Videos & More
> >http://faith.yahoo.com
> >
> >--
> >To unsubscribe, e-mail:  
> 
> >For additional commands, e-mail:
> 
> 
> --
> Ceki
> 
> TCP implementations will follow a general principle
> of robustness: be
> conservative in what you do, be liberal in what you
> accept from
> others. -- Jon Postel, RFC 793
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to get PrintStream of an Appender?

2002-10-10 Thread Shapira, Yoav

Hi,

>We are using a third-party tool where its debugger
>only has the method 'getDebugStream(PrintStream s)'
>to config its debug io stream.

OK.

>We want to use log4j, which means we need to pass
>the streams associated with an Appender (file or
>socket appender). Can this be done and how to
>get the stream of an Appender?

I'm not sure how you would this.  There are several reasons against
this.  One reason, for example, is that log4j is thread safe, and if it
exposes its streams for manipulation by other components, they might
lock the streams, hence potentially locking log4j.

Another reason is that log4j conceptually doesn't want you to concern
yourself with streams per-se, only loggers, appenders, and the like.

Perhaps a solution to your problem would be: set your 3rd party tool
print stream to System.out or System.err, then configure a log4j console
appender to grab messages headed to System.out and/or System.err.  This
extra level of redirection, while slowing down logging, will keep your
3rd party tool and log4j both happy and decoupled.

Yoav Shapira
Millennium ChemInformatics


This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Properties not loaded?

2002-10-10 Thread Ceki Gülcü

At 12:01 10.10.2002 +0100, you wrote:
>When I set the system property using "java
>-Dlog4j.configuration=/mydir/log4j.properties myClass"
>I do not get the properties held in here picked up. I though if I specified
>this property I would never have to invoke the
>PropertyConfigurator.configure or PropertyConfigurator.basicConfiguration
>functions.

That is correct. Does the file /mydir/log4j.properties exist? The file 
should be picked up. Try setting log4j.debug=true and observe the results.


>If I do can you suggest a was to call this if I don't have access
>to the enter point of the application. Currently I have to put a static
>initialized in every class that logs.

That's an anti-pattern that you must avoid.

>Thanks
>Guy

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Properties not loaded?

2002-10-10 Thread Guy Laurent

When I set the system property using "java
-Dlog4j.configuration=/mydir/log4j.properties myClass" 
I do not get the properties held in here picked up. I though if I specified
this property I would never have to invoke the
PropertyConfigurator.configure or PropertyConfigurator.basicConfiguration
functions. If I do can you suggest a was to call this if I don't have access
to the enter point of the application. Currently I have to put a static
initialized in every class that logs.

Thanks
Guy



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Sorry about post

2002-10-10 Thread Thomas Saxtoft

Hi everybody

I just made a post to this list which should have been to an Ant list. I
apologize.

Thomas

--
To unsubscribe, e-mail:   
For additional commands, e-mail: