logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40889] New: - repeated entries in log after failure
Date Fri, 03 Nov 2006 15:51:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40889>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40889

           Summary: repeated entries in log after failure
           Product: Log4j
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: kustanowitz@choicemedia.com


I found that after a failed log entry (JdbcAppender) in mysql (I believe 5.0 
but I'm not sure), mysql does in fact write the entry, but an error must be 
returned at some point because it's not removed from the buffer.

This happened after writing non-ascii characters to the field, or after 
exceeding the 255 character limit I had set on the field.

I fixed this by moving "removes.add(logEvent);" to be BEFORE the execute(sql); 
statement, which ensures it will always get removed, even if an error occurs.

Since this is not necessarily the desired behavior for all apps, I would 
recommend exposing this as a setting on the class, controlled via some 
variable like "removeFromBufferOnError" or something more creative.

This is my first posting to a jakarta project -- thanks for all the hard work 
that makes our lives easier!

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

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message