RE: Configuration question.

2001-02-27 Thread Kitching Simon
Hi Jeff, By default, the configurator will create Category objects of the default type. Have you told the configurator to create instances of your custom Category? If not, and you are (elsewhere) trying to cast this Category object to your custom class then it will generate a ClassCastExceptio

RE: log4j, EJB, J2EE RI

2001-02-27 Thread Kitching Simon
> it to some EJB objects, and I don't mind if a message gets lost here or > there The app doesn't get a lot of use, so the chances of two > people/processes trying to write to the same file is fairly low > > So, does the logger fail cleanly, or does it fail mess

RE: async appender question

2001-02-27 Thread Kitching Simon
In the source distribution, see: org/apache/log4j/xml/examples/sample4.xml Cheers, Simon > -Original Message- > From: Peter Lin [SMTP:[EMAIL PROTECTED]] > Sent: Tuesday, February 27, 2001 9:43 PM > To: [EMAIL PROTECTED] > Subject: async appender question > > > Is there an exam

RE: log4j, EJB, J2EE RI

2001-02-27 Thread Kitching Simon
a method call in the EJB's that does a > URLConnection and pass the message off to a Servlet which could handle > logging the message to a FileAppender. That way, I could retain the layout > and use the FileAppender. > > Would this concept be a problem? > > > >

RE: log4j, EJB, J2EE RI

2001-02-27 Thread Kitching Simon
Hi John, It has been mentioned several times on this list that the FileAppender really shouldn't be used for EJB development. FileAppender isn't designed for multiple processes writing to the same file, and (as you have seen) there are also security/access issues with creating a file on disk.

RE: creating filter based on time interval

2001-02-21 Thread Kitching Simon
Hi Sushil, As far as I know there is no such log4j feature as you describe in your email. If you want to implement it, here is a suggestion about how I would do it (no promises this is the best way!). I would create a new Filter class which keeps a FIFO queue of references to the last N message

RE: Regarding Log File size and logging different messages to differe nt appenders.

2001-02-20 Thread Kitching Simon
>say 3 appenders - console, file and NTEventLog and I wanna log debug and > >info to console, info and warning to file and Error and fatal messages to > >NTEventLog then how do we organise these things with XML file and also > with > >source. [Kitching Simon]

RE: Log4j and Appservers (Weblogic)

2001-02-16 Thread Kitching Simon
n > appserver successfully. > > Is this because some appservers are very relaxed about enforcing the > standards on classes used by EJBs? I'm really thinking of the > synchronization that log4j does, which shouldn't really be 'allowed' > when called from an EJB.

RE: Question about logging in EJB

2001-02-16 Thread Kitching Simon
rmation > to a central JMS queue. A central listener would then get all of the log > messages, and log them to file, etc. [Kitching Simon] That seems to be a reasonable approach to me. You may wish to look into using AsyncAppender as a "wrapper" a

RE: Changing Category priority while a program is running

2001-02-16 Thread Kitching Simon
Hi Chris, Have a look at the "configureAndWatch" methods on DOMConfigurator and PropertyConfigurator.. Regards, Simon > -Original Message- > From: Chris Gunn [SMTP:[EMAIL PROTECTED]] > Sent: Friday, February 16, 2001 5:17 PM > To: [EMAIL PROTECTED] > Subject: Changing Categor

RE: which XML libraries does the DOMConfigurator requires?

2001-02-16 Thread Kitching Simon
Hi Geert, With a simple check, you can see where the "trax" classes are used from: [venus]/home/skitchin/loghack/jakarta-log4j/org-> find . -name "*.java" -exec grep trax {} \; -print import org.apache.trax.Processor; import org.apache.trax.TemplatesBuilder; import org.apache.trax.Templates; imp

RE: adding custom priorities

2001-02-15 Thread Kitching Simon
tegory.fred = com.acme.Priority#TRACE, appender1 > > Simon: > > Is this patch you talk about (see above) the same as the use-a-wrapper > workaround you sent on the mailing list an hour ago? > [Kitching Simon] No, the two subjects (priority patch, Cate

RE: adding custom priorities

2001-02-15 Thread Kitching Simon
Hi Jim, Nice to see there *are* people using custom Priorities .. I thought I was alone for a while! Just a few comments: (a) with this approach, the custom category needs to be used like this: TraceableCategory cat = (TraceableCategory) TraceableCategory.getInstance("catname"); cat.trac

RE: adding custom priorities

2001-02-15 Thread Kitching Simon
Hi Geert, This all sounds very familiar - been there! An alternative approach to creating a new Category class, and all the related gumph is to create a *wrapper* for Category that knows about the custom priorities. Advantages: (a) no casting (b) no need for custom CategoryFactory, etc. (c) mos

RE: configuring appenders

2001-02-13 Thread Kitching Simon
Hi Julie, If your code writes to a category, then that category "exists", whether it is defined in the configuration file or not. What you can do is set up the configuration file so that the logging level of the category is so high that all messages get discarded, which I think is what you are

RE: Multiple AsyncAppenders -> multiple threads?

2001-02-13 Thread Kitching Simon
Hi Otis, Re your comment >Reading about AsyncAppender made me want to switch to it from FileAppender. AsyncAppender isn't a complete appender; it is a "wrapper" that can be placed around another appender. The AsyncAppender is configured with an appender instance (eg an instance of JMSAppender).

RE: AsyncAppender in linux

2001-02-13 Thread Kitching Simon
Hi Michiel, The benefit of the AsyncAppender is not that logging runs faster (ie log messages get written to disk faster), but that code which *calls* log methods runs faster, because it does not wait for the logged message to be written. In order to prove this, what you need is a very slow Appe

RE: Separate InitialContext

2001-02-08 Thread Kitching Simon
How about using the AsyncAppender in combination with the JMSAppender? This seems to be just what it was designed for. > -Original Message- > From: Roger Kjensrud [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, February 07, 2001 8:16 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subje

how to set threshold on an appended from DOMConfigurator file

2001-02-06 Thread Kitching Simon
Is there a way to configure an xml configuration file so that the threshold of an appender gets set? Thanks, Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Cannot get SyslogAppender to work

2001-01-31 Thread Kitching Simon
On a similar thread, I'm busy working on a DatagramAppender class, mainly by ripping off the SyslogAppender class :-) The basic problem I have is an applet embedded in an intranet web page. I want this applet to be able to log issues to a central file, no matter what workstations it is running o

RE: Multiple apps in same JVM

2001-01-29 Thread Kitching Simon
Hi David, How about subclassing the appender (eg FileAppender) class to check the threadid against some table to determine the destination to write the output to? For example, if your threads are in different thread-groups, then the FileAppender could check it's threadgroup, and output to a thr