Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#10234) freelog callback when writing to file
Home

[Freeciv-Dev] (PR#10234) freelog callback when writing to file

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10234) freelog callback when writing to file
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Tue, 21 Sep 2004 08:45:21 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10234 >


  log_init() comment claims that if both filename and callback function 
are non-NULL, they are also both used. Also, server is careful not to 
set console callback when it wants logging to file only. Still, callback 
function is not used when log is written to file. I guess that this was 
changed when gui-gtk-2.0 got its callback.

  Attached patch enables callback usage even when log is written to file 
too. New bool parameter tells callback if log was written to file too. 
Instead of totally preserving old behavior in callbacks, I took liberty 
of writing LOG_FATAL messages to console even when they are written to 
file too. I also rearranged things so that file writing is before 
callback call. No matter how buggy and crash prune custom callback is, 
log should always be written to file at least.


  - Caz




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10234) freelog callback when writing to file, Marko Lindqvist <=