OSYSTEM: Add logging API as proposed by Max on -devel
|Reported by:||lordhoto||Owned by:||lordhoto|
this implements the API described in "PROPOSAL: Removing (f)printf usage".
Most of the changes are done, but it might be noteworthy that I was only able to check the compilation and result on Linux
Only the Symbian port still needs adaption. The Symbian port currently has it's own "FatalError" function which takes a string and displays that as an error message to the user and then quits. I am unsure in how to adapt that to the new API though. Also the Symbian port formerly didn't output any warnings at all as far as I can tell (at least there's some check which only called fputs in case in case __SYMBIAN32__ wasn't defined).
Another bits is that in case there's no g_system setup properly yet debug/warning/error won't output anything at all anymore. This sounds bad, at least in case the backend wants to use those for reporting of initialization problems. I am open for suggestions here.
I also noticed that it seems the SamsungTV backend doesn't have a working "exit" implementation, at least it's replaced by an endless loop. Since when there's no g_system we can't call OSystem::fatalError I had to leave that in ::error.
Last but not least I still had to include some backends headers for the default implemtation of OSystem::logMessage, since it relies on fputs and fflush. I am not sure whether we really want that, on the other hand I miss an good idea on how to avoid that right now though (except with offering no default implementation).
Ticket imported from: #3104630. Ticket imported from: patches/1355.