melonDS icon indicating copy to clipboard operation
melonDS copied to clipboard

Add a custom logging function - allows logging to file

Open RayyanAnsari opened this issue 4 years ago • 2 comments
trafficstars

This PR creates a custom logging function and gives an option to either log to console, or to log to file.

Changes

  • All printf calls are now Platform::LogMessage
  • A new settings dialog has been created: Log Settings
  • Two new variables are added to the config file: LogToFile and LogFileLocation
  • The new Platform::LogMessage function uses either vprintf or vfprintf depending on the user's setting

RayyanAnsari avatar Dec 12 '20 15:12 RayyanAnsari

If we're doing a custom logging thing, we really should also have log levels I think?

nadiaholmquist avatar Jul 31 '21 12:07 nadiaholmquist

We could, but currently this is just a wrapper around printf and fprintf. That would require modifying all of the printf statements we have.

RayyanAnsari avatar Jul 31 '21 12:07 RayyanAnsari