DO NOT REPLY [Bug 42171] SocketHubReceiver duplicates messages

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=42171





--- Comment #10 from Paul Smith <[EMAIL PROTECTED]>  2008-09-02 23:51:04 PST ---
Hey, I just tried to take the latest patch that ray@ posted but I can't seem to
apply it cleanly to the log4j-receivers project.  Took me a bit longer than it
should have (8 month old baby, lack of sleep) to realise the 2nd modified file
in the patch is actually for the log4j project, not for log4j-receivers
(SocketNode is part of log4j.

this makes me wonder exactly where you generated the patch from..?  for
example, my local copy of SocketHubReceiver.java from the log4j-receivers
project has a setSocket method that looks like this:

connector = null;
socket = newSocket;
SocketNode13 node = new SocketNode13(socket, this);
node.addSocketNodeEventListener(this);

yet your patch refers to using SocketNode.  ?  I may just be sleep deprived
here.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 45721] [PATCH] when showing a stack trace - include the relative package versions and optional jar name to aid debugging

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45721





--- Comment #6 from Paul Smith <[EMAIL PROTECTED]>  2008-09-02 14:57:28 PST ---
In regards to the non-English locales, how exactly does one configure the JVM
to use non-English stack traces?  Looking at the Throwable.printStackTrace()
there's a hard-coded 'at':

public void printStackTrace(PrintStream s) {
synchronized (s) {
s.println(this);
StackTraceElement[] trace = getOurStackTrace();
for (int i=0; i < trace.length; i++)
s.println("\tat " + trace[i]);



So I don't think there's any locale issue to worry about here.  I tend to agree
with James that having this as the default behaviour is a really good thing,
but probably going to be controversial (50% love it, 50% will rant on the list
that they hate it and demand to change the default behaviour - I think it's
just one of those things).

For this reason I would tend to agree with Curt that leaving the default
behaviour as it is is probably the safer option initially (log4j 2.0 however
could be different ball game).  EnhancedPatternLayout maybe more flexible
generally.  The other option to consider is having the option enabled/disable
in the DOMConfiguration layer as 'log4j.debug' is tuned:

e.g. in log4j.xml:

https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 45721] [PATCH] when showing a stack trace - include the relative package versions and optional jar name to aid debugging

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45721





--- Comment #5 from Curt Arnold <[EMAIL PROTECTED]>  2008-09-02 08:05:09 PST ---
How do JVMs format stack traces for non-english locales?  Do they start with
"at" as the implementation requires.

I'd be surprised if this didn't break the unit tests, at least if the tests
were running against a log4j.jar.

The desired behavior could be configurable if it were moved into PatternLayout
or better, EnhancedPatternLayout.  Currently both of those return true for
ignoreThrowable which delegates the stack trace formatting to the
WriterAppender and ThrowableInformation.   When configured for the enhanced
stack trace, the layout would return false and format the stack trace itself.  
If moved into EnhancedPatternLayout, the implementation could use the JDK 1.4
Throwable.getStackTrace method and avoid attempting to parse the
printStackTrace output since extras requires JDK 1.4 or later.  Could add a
stackTrace property to EnhancedPatternLayout with values: none, default and
enhanced.

As for JVM implementation, you could bounce the idea off
[EMAIL PROTECTED] and see their thoughts.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 45721] [PATCH] when showing a stack trace - include the relative package versions and optional jar name to aid debugging

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45721





--- Comment #4 from James Strachan <[EMAIL PROTECTED]>  2008-09-02 07:01:50 PST 
---
Created an attachment (id=22514)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22514)
here's an updated patch that lets this feature be disabled via calling
ThrowableInformation.setIncludeVersionInformation(false).set

Here's an improved patch that lets folks disable this feature too. Its way too
important and useful to all log4j using projects out there to have this
disabled by default - but this allows folks to disable it if they want


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [PATCH] when showing a stack trace - include the relative package versions and optional jar name to aid debugging

2008-09-02 Thread James.Strachan



Thorbjørn Ravn Andersen wrote:
> 
> James.Strachan skrev  den 01-09-2008 14:51:
>> Thoughts?
>>   
> I really like this :)  Excellent!
> 
> How did you get the idea?
> 

Thanks! :)

I guess the idea just came from frustration at answering a zillion emails
from folks who just post a stack trace without any kind of version or
classpath information, expecting folks to know exactly what caused it - when
the first mail is always 'so what version are you using...' etc :)

I'm more surprised we've not thought of doing something like this before!
Would love to get this patch into the JVM too! :)

James
-- 
View this message in context: 
http://www.nabble.com/-PATCH--when-showing-a-stack-trace---include-the-relative-package-versions-and-optional-jar-name-to-aid-debugging-tp19254233p19269630.html
Sent from the Log4j - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 17887] RollingFileAppender does not work for 10 threads

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=17887





--- Comment #8 from Thorbjørn Ravn Andersen <[EMAIL PROTECTED]>  2008-09-02 
05:51:10 PST ---
(In reply to comment #7)

> >   SocketServer(File directory) {
> > this.dir = directory;
> > hierarchyMap = new Hashtable(11);
> >   }
> > There must be some mixing or hidden bugs between the clients if exceeding 10
> > clients.
> > Thanks for your feedback if this is the right reason.
> > See http://d.cr.free.fr/wswebconsulterfichiers.php?projet=demojava_log4j for
> > (many..) extra bugs in log4j
> 
> 11 is the initial allocation size for hierarchMap, of course, which is the
> default anyway. May be a lack of memory + unmanaged allocation error ?

It is unusual to provide the initialCapacity to the HashTable constructor
(especially for such a low value) but not illegal.

http://java.sun.com/javase/6/docs/api/java/util/Hashtable.html#Hashtable(int)

Could you please elaborate on why your tool thinks these two cases are related?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [PATCH] when showing a stack trace - include the relative package versions and optional jar name to aid debugging

2008-09-02 Thread Thorbjørn Ravn Andersen

James.Strachan skrev  den 01-09-2008 14:51:

Thoughts?
  

I really like this :)  Excellent!

How did you get the idea?

--
 Thorbjørn Ravn Andersen  "... plus... Tubular Bells!"


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 17887] RollingFileAppender does not work for 10 threads

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=17887





--- Comment #7 from QualityChecker <[EMAIL PROTECTED]>  2008-09-02 03:17:35 PST 
---
(In reply to comment #6)
> May be the reason :
> The SocketServer TCP/IP server is designed to manage 10 (or 11 ?) maximum
> threads .
> See org.apache.log4j.net.SocketServer.java constructor :
> public
>   SocketServer(File directory) {
> this.dir = directory;
> hierarchyMap = new Hashtable(11);
>   }
> There must be some mixing or hidden bugs between the clients if exceeding 10
> clients.
> Thanks for your feedback if this is the right reason.
> See http://d.cr.free.fr/wswebconsulterfichiers.php?projet=demojava_log4j for
> (many..) extra bugs in log4j

11 is the initial allocation size for hierarchMap, of course, which is the
default anyway. May be a lack of memory + unmanaged allocation error ?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 17887] RollingFileAppender does not work for 10 threads

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=17887


QualityChecker <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #6 from QualityChecker <[EMAIL PROTECTED]>  2008-09-02 02:30:25 PST 
---
May be the reason :

The SocketServer TCP/IP server is designed to manage 10 (or 11 ?) maximum
threads .
See org.apache.log4j.net.SocketServer.java constructor :

public
  SocketServer(File directory) {
this.dir = directory;
hierarchyMap = new Hashtable(11);
  }
There must be some mixing or hidden bugs between the clients if exceeding 10
clients.

Thanks for your feedback if this is the right reason.

See http://d.cr.free.fr/wswebconsulterfichiers.php?projet=demojava_log4j for
(many..) extra bugs in log4j


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 45721] [PATCH] when showing a stack trace - include the relative package versions and optional jar name to aid debugging

2008-09-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=45721





--- Comment #3 from James Strachan <[EMAIL PROTECTED]>  2008-09-02 01:17:17 PST 
---
thanks Paul :) 

I did try to make it configurable; but that'd need a bigger refactor as there's
no real way to access any context from the ThrowableInformation - unless we
just make it a static property that can be initialised on startup via some
system property?

I figure lets enable it by default as its low noise (stack traces are already
huge and its typically only gonna print a small version string most of the time
- in the middle of the stack trace that few users actually look at anyway -
they only read the first line which would have no version information in it
anyway); then lets folks disable it explicitly via log4j.xml/properties if they
really wish.

BTW the ultimate end user might not think they want this - but when they hit an
issue - the poor person on the open source list trying to figure out their
issue will really want it! I'd hugely recommend that users have to go out of
their way to disable this; as having it on by default will help loads of us
open source hackers support our libraries/projects that get embedded in a
zillion projects out there.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]