logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gulcu <c...@qos.ch>
Subject Re: For Ceki: Problem working with SMTPAppender
Date Sat, 01 Dec 2001 10:30:15 GMT

Max,

Any appender extending AppenderSkeleton will refuse to log after its close method is called.
SMTPAppender falls into this case. In any case, you should remove the appender that was closed.
Are you absolutely sure that the close method of SMTPAppender was called? I suggest you insert
a System.out.println in SMTPAppender.close to make sure it is called on the right appender.

By the way, what were the modifications that solved the problem? 

With regards to the new version of log4j, I don't think upgrading to log4j 1.2 will not solve
the SMTPAppender issue. On the other hand, unless you extended the Category class, you can
consider version 1.2 as a drop in replacement for 1.1.3. Just try it... 

Regards, Ceki



At 17:27 30.11.2001 -0600, you wrote:
>Hi Ceki,
>
>  After reading number of messages on this developer forum, I can see that
>you are the person who may be able to help me. In my application I am using
>SMTPAppender to send log events to my e-mail address when something happens.
>I use management interface to create and remove SMTPAppenders, based on
>their name and other parameters, such as filter specifications. What I
>resently noticed was that if I remove SMTPAppender try to generate dummy
>alerts, I am still receiving e-mail messages. It seems like SMTPAppender is
>still active after I explicetly closed it. Also, if I would create another
>appender with the same name and try to generate more log events, I now
>receive two e-mails for each log event generate. 
>
>In trying to resolve this problem I went and modified SMTPAppender class and
>AppenderAttachableImpl class. After I did this, everything started to work
>fine. 
>
>So, my question to you is: 
>If you worked with SMTP appender before, did you ever noticed this behavior?
>
>And if did, is this a bug or just a misexecution on my part? 
>If this is a bug and you know about it, was it fixed in the latest release
>of log4j? 
>
>Sorry for asking so many questions, but our application is very much
>integrated with log4j and I would not want to upgrade to a new release of
>log4j in the next month if I don't have to, but I also don't want to support
>my custom version of log4j without a need for it. Thanks in advance.
>
>
>Max Stolyarov
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


Mime
View raw message