Dear all :
Is it possible on windows ??? SocketAppender... writes to socket ~~AND~~ also 
gives Exception ??

/// Code piece
      } catch(IOException e) {
                        //oos = null;
                        isException = true;
                        LogLog.warn("Detected problem with connection: Trying 
to Log.... :" + strLogEventMsg +e);
                        objSingletonEventHandler.isSocketServerConnected = 
false;
                        appenderObservable.fireEventToObservers("407");
                        fireConnector();
                        /*
                        if(reconnectionDelay > 0) {
                         System.out.println("fireConnector" );
                          fireConnector();
                        } else {
                            errorHandler.error("Detected problem with 
connection, not reconnecting.", e,
                       ErrorCode.GENERIC_FAILURE);
                        }
                        */
/// End Code piece
We encountered situation where it gives exception but still writes to server.
Basically I save the LoggingEvent in finally block store & send it again.... It 
ends up writing twice at server... How to avoid this situation...

/// Code piece
          finally {
                if (isException)
                {
                        LogLog.debug("append(string): Exception " +  "Updating 
isSocketServerConnected-written=false " + 
objSingletonEventHandler.isSocketServerConnected);
                        writeToLocalFile(event);
                }
/// End Code piece

-----Original Message-----
From: Ceki Gulcu [mailto:[email protected]]
Sent: Friday, March 06, 2009 7:21 PM
To: Log4J Users List
Subject: Re: strange behaviour of log4j


Hello Arend,

The effect you are observing is most probably caused by multiple JVMs logging
into the same file.

Vogtländer, Arend (bos) wrote:
> Dear Sir or Madam,
>
> we have monitored a quite strage effect in log4j logfiles, which are
> produced on a JBoss applicationserver of one of our customers.
>
> the effect ist as follows:
>
> the logfiles start with a line of nullvalues (0x00). this line is sometimes
> a large ammounts of screenpages long.
>
> It seems that there ist a nullvalue pushed to the beginning of the logfile
> every some time.
>

--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


This e-mail and all material transmitted with it are for the use of the 
intended recipient(s) ONLY and contains confidential and/or privileged 
information. If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all copies and the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken pursuant to the contents of the 
present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Bharti Telesoft Limited or its management or 
directors, are unable to exercise control or ensure the integrity over /of the 
contents of the information contained in e-mail. Any views expressed herein are 
those of the individual sender only and no binding nature of the contents shall 
be implied or assumed unless the sender does so expressly with due authority of 
Bharti Telesoft Limited. E-mail and any contents transmitted with it are prone 
to viruses and related defects despite all efforts to avoid such by Bharti 
Telesoft Limited.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to