mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
Introduce Platform::Log
(#1640)
* Add Platform::Log and Platform::LogLevel * Replace most printf calls with Platform::Log calls * Move a brace down * Move some log entries to one Log call - Some implementations of Log may assume a full line * Log the MAC address as LogLevel::Info
This commit is contained in:

committed by
GitHub

parent
19280cff2d
commit
79dfb8dc8f
@ -25,6 +25,10 @@
|
||||
#include <QStringList>
|
||||
|
||||
#include "CLI.h"
|
||||
#include "Platform.h"
|
||||
|
||||
using Platform::Log;
|
||||
using Platform::LogLevel;
|
||||
|
||||
namespace CLI
|
||||
{
|
||||
@ -55,7 +59,7 @@ CommandLineOptions* ManageArgs(QApplication& melon)
|
||||
switch (posargs.size())
|
||||
{
|
||||
default:
|
||||
printf("Too many positional arguments; ignoring 3 onwards\n");
|
||||
Log(LogLevel::Warn, "Too many positional arguments; ignoring 3 onwards\n");
|
||||
case 2:
|
||||
options->gbaRomPath = posargs[1];
|
||||
case 1:
|
||||
@ -79,7 +83,7 @@ CommandLineOptions* ManageArgs(QApplication& melon)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("ERROR: -b/--boot only accepts auto/always/never as arguments\n");
|
||||
Log(LogLevel::Error, "ERROR: -b/--boot only accepts auto/always/never as arguments\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user