Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 11 years ago

Closed 11 years ago

#297 closed defect (fixed)

Make orxonox.log configurable

Reported by: rgrieder Owned by: rgrieder
Priority: major Milestone: Version 0.2 Codename: Bellatrix
Component: GeneralFramework Version: 0.2.0
Keywords: Cc:
Referenced By: References:

Description

Creating the Orxonox log is about the first thing that our program does after execution. That implicates that at that moment it is not yet known where to write the log data. The resolution is to always write everything to "orxonox.log" in the current working directory.
But this concept doesn't hold with binary distribution. I suggest making a little workaround: Do not write output until the output file path is known (that is before the GameStates are created) but instead cache it in a buffer.
The obvious problem is of course that when an error happens before that, there is no output to examine. This could be resolved by implementing a fallback that can be switched on (maybe with a macro) in OutputHandler.cc

Change History (2)

comment:1 Changed 11 years ago by rgrieder

  • Owner changed from nobody to rgrieder
  • Status changed from new to assigned

comment:2 Changed 11 years ago by rgrieder

  • Resolution set to fixed
  • Status changed from assigned to closed

orxonox.log gets written to the log directory per definition (hard coded) now. But since that directory can be compile time (also install vs. development run) variable, all output is written to tmp/orxonox.log (Unix) or %TEMP%/orxonox.log (Windows) and then copied to the right logfile once the folder is known (after main()).

Note: See TracTickets for help on using tickets.