logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Psenner" <dpsen...@gmail.com>
Subject AW: Remote appender not sending
Date Fri, 18 Oct 2013 13:06:02 GMT
*hm* .. I see .. but changing the timer whenever an event arrives
effectively makes the timer useless.


Glad you were able to solve this.




Von: Howe, Peter L [mailto:phowe@paychex.com] 
Gesendet: Freitag, 18. Oktober 2013 14:33
An: Log4NET Dev
Betreff: RE: Remote appender not sending


Since timer.Change( ) is called every time an event is added, I think it is
not the timer.  I made a change elsewhere in my code, changing this:


            RemotingConfiguration.Configure(null, true);


To this:


            RemotingConfiguration.Configure(null, false);



Data started flowing when I turned off the security on both ends.  I don't
know if I will be able to keep it this way, but any machine on which this is
done will be behind the firewall, so hopefully I won't have to figure out
all the security stuff for remoting.




From: Dominik Psenner [mailto:dpsenner@gmail.com] 
Sent: Friday, October 18, 2013 2:26 AM
To: 'Log4NET Dev'
Subject: AW: Remote appender not sending


IMHO here be dragons:


        protected override void Append(LoggingEvent loggingEvent) 



            timer.Change(FlushPeriod * 1000, Timeout.Infinite); 



According to:




If period is zero (0) or
spx> Infinite, and dueTime is not Infinite, the callback method is invoked
once; the periodic behavior of the timer is disabled, but can be re-enabled
by calling
Change and specifying a positive value for period.


Von: Dominik Psenner [mailto:dpsenner@gmail.com] 
Gesendet: Freitag, 18. Oktober 2013 08:14
An: 'Log4NET Dev'
Betreff: AW: Remote appender not sending


You implemented a timed appender .. maybe you forgot to start the timer? :)


Von: Howe, Peter L [mailto:phowe@paychex.com] 
Gesendet: Donnerstag, 17. Oktober 2013 17:01
An: Log4NET Dev
Betreff: RE: Remote appender not sending


I also set up my test client to call LogManager.Shutdown( ) separately from
closing the application, with pauses in between things.  After calling
shutdown (and a long timeout), this message was displayed on the client:


log4net: Hierarchy: Shutdown called on Hierarchy

log4net:ERROR [TimedRemotingAppender] RemotingAppender [RemotingAppender]

to send all queued events before close, in OnClose.


However, all four of the previously mentioned connections remain established
until the client application itself closes, at which point those connections





From: Howe, Peter L 
Sent: Thursday, October 17, 2013 10:44 AM
To: Log4NET Dev
Subject: Remote appender not sending
Importance: High


OK, here is my situation.


I have a server process written that listens on the correct port for a
remoting connection.  I see it in NETSTAT:


               TCP           DEV-D-21F7T:0
LISTENING       884


My test application makes a few calls to log4net.  I have implemented the
TimedRemotingAppender shown in these posts:




As expected, nothing happens in Remoting until the timer expires.  I made
four logging calls in the test client.  I put a breakpoint in the
TimedRemotingAppender.Append method to make sure it gets called - it is
getting called all four times.  Each time it calls base.Append.   Once the
timer expires and the flush( ) method is called, Remote connections show up


  TCP         DEV-D-21F7T:52589      ESTABLISHED     884

  TCP         DEV-D-21F7T:52590      ESTABLISHED     884

  TCP         DEV-D-21F7T:52591      ESTABLISHED     884

  TCP         DEV-D-21F7T:52592      ESTABLISHED     884

  TCP        DEV-D-21F7T:8085       ESTABLISHED     7268

  TCP        DEV-D-21F7T:8085       ESTABLISHED     7268

  TCP        DEV-D-21F7T:8085       ESTABLISHED     7268

  TCP        DEV-D-21F7T:8085       ESTABLISHED     7268


I see a separate remoting connection here for each of the four log events,
however IRemoteLoggingSink.LogEvents( ) is never called on the server.
Things are getting lost somewhere in the bowels of log4net, even though it
LOOKS like Remoting connections are being made.


Can anyone point me in the right direction as far as where to look?





The information contained in this message may be privileged, confidential
and protected from disclosure. If the reader of this message is not the
intended recipient, or an employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please notify
your representative immediately and delete this message from your computer.
Thank you.

View raw message