Menu

#5 logging to file fails

open
5
2003-12-09
2003-12-03
Nic Gorleer
No

The logging to a file fails when a buffered
compositelogger uses a non buffered filelogger. The Write
(Event[] events, int length) method cannot create a
streamwriter because there is already a streamwriter
created for the file by the open method. This
streamwriter should be closed in the Write function. I
have attached an updated FileLogger.cs file. I also
removed the eventFormatter.Suffix = "\n" line in the
constructor because this produces faulty output if you
open the generated file with notepad.

Discussion

  • Nic Gorleer

    Nic Gorleer - 2003-12-03

    Fixed filelogger.cs

     
  • Jeffrey Varszegi

    • assigned_to: nobody --> jvarszegi
     
  • Nobody/Anonymous

    Logged In: NO

    True.

     

Log in to post a comment.

MongoDB Logo MongoDB