Re: Context Based Repository Selectors and MDC

2004-11-04 Thread Jacob Kjome
At 05:07 PM 11/4/2004 -0600, you wrote: >Thanks Jacob, I did as you suggested and checked out the >ContextClassLoaderSelector from LOG4J_SANDBOX_ALPHA3. I'm calling this >class from the initLoggerRepository() method in InitContextListener like so: > >//ContextClassLoaderSelector.doIdempotentInitia

RE: extending log4j question

2004-11-04 Thread Mark Womack
It is unclear to me what your singleton is providing over the basic Logger class besides the Util.freeze() convenience. If you want to do something for a monitor, look at using Chainsaw as a client to "connect" to the remote services as needed. -Mark -Original Message- From: rubble [mail

Re: Context Based Repository Selectors and MDC

2004-11-04 Thread Ted Gittinger
Thanks Jacob, I did as you suggested and checked out the ContextClassLoaderSelector from LOG4J_SANDBOX_ALPHA3. I'm calling this class from the initLoggerRepository() method in InitContextListener like so: //ContextClassLoaderSelector.doIdempotentInitialization(); try { Object guard = new Objec

Re: extending log4j question

2004-11-04 Thread Tom . Goetze
Having done alot of code reviews recently, I want to make sure that you know your singleton implementation is not thread safe. That could be fine if you don't have mutliple Threads in your application, but if you do, then you'll need to modify your implementation to have a static Log3 instance

RE: MDC & renderer question

2004-11-04 Thread Scott Deboy
If you wrote your own filter you wouldn't have to worry about object renderer. See an example here: http://cvs.apache.org/viewcvs.cgi/logging-log4j/src/java/org/apache/log4j/varia/ReflectionFilter.java?rev=1.1&view=auto -Original Message- From: O'Rourke, Brian [mailto:[E

MDC & renderer question

2004-11-04 Thread O'Rourke, Brian
Hello, I have a question about MDC & ObjectRenderers. There are various places in my application where I log certain pertinent information of a class of mine called "DataNode", so I created an ObjectRenderer class that writes all specific DataNode details to a log. More recently I found occasion

Re: extending log4j question

2004-11-04 Thread rubble
freeze simple method that serializes any object to xml. I have a bunch of .debug("could do do this to this record", RecordVO); I know, I could convert my code to .debug("could do do this to this record" + Util.freeze(RecordVO) ); But since I was using my own logging framework before I just ma

Re: extending log4j question

2004-11-04 Thread Ceki Gülcü
At 04:42 PM 11/4/2004, rubble wrote: public void debug(String msg, Object obj) { log4j.debug(msg + ": " + Util.freeze(obj)); } What does Util.freeze(obj) do? -- Ceki Gülcü For log4j documentation consider "The complete log4j manual" http://www.qos.ch/shop/products/eclm/

extending log4j question

2004-11-04 Thread rubble
Hello, I'm trying to migrate over to log4j from a custom logging framework. I have a log of log.debug(String, Object) calls in my code. What I've tried (and works) is creating singleton that accesses log4j (i've included my singleton code below). I'm concerned that this singleton will adversely

Re: Réf. : Two JVM's logging to the same file

2004-11-04 Thread Ceki Gülcü
Dominique, You are correct. Log4j does not support concurrent writes from *different* JVMs to the same file. However, concurrent writes from different threads in the same JVM using the same appender instance is of course fine. See also http://logging.apache.org/log4j/docs/faq.html#3.3 At 02:34 PM

Réf. : Two JVM's logging to the same file

2004-11-04 Thread dominique . jocal
It seems you have the answer in the mail's subject : i don't think log4j open files in an "append" access mode that support concurrent writes; i'm not sure this mode is even supported by Java, either by Unix or Windows I'm not specialist on this area, i'm interested in the other answers of the

Two JVM's logging to the same file

2004-11-04 Thread Trond G. Ziarkowski
Hi all, I have a webapp running under Tomcat, that logs to a file. The db used in this webapp needs periodic maintenance, and I have some small apps that are run from crontab, that manages this. The information from these apps are logged to the same file because of the relevance to webapp behav