log: replace all NGLOG with LOG

This commit is contained in:
wwylele 2018-06-29 14:18:07 +03:00
parent fde415968e
commit 7c5a76e58b
152 changed files with 1541 additions and 1541 deletions

View file

@ -69,38 +69,38 @@ static void PrintVersion() {
static void OnStateChanged(const Network::RoomMember::State& state) {
switch (state) {
case Network::RoomMember::State::Idle:
NGLOG_DEBUG(Network, "Network is idle");
LOG_DEBUG(Network, "Network is idle");
break;
case Network::RoomMember::State::Joining:
NGLOG_DEBUG(Network, "Connection sequence to room started");
LOG_DEBUG(Network, "Connection sequence to room started");
break;
case Network::RoomMember::State::Joined:
NGLOG_DEBUG(Network, "Successfully joined to the room");
LOG_DEBUG(Network, "Successfully joined to the room");
break;
case Network::RoomMember::State::LostConnection:
NGLOG_DEBUG(Network, "Lost connection to the room");
LOG_DEBUG(Network, "Lost connection to the room");
break;
case Network::RoomMember::State::CouldNotConnect:
NGLOG_ERROR(Network, "State: CouldNotConnect");
LOG_ERROR(Network, "State: CouldNotConnect");
exit(1);
break;
case Network::RoomMember::State::NameCollision:
NGLOG_ERROR(
LOG_ERROR(
Network,
"You tried to use the same nickname then another user that is connected to the Room");
exit(1);
break;
case Network::RoomMember::State::MacCollision:
NGLOG_ERROR(Network, "You tried to use the same MAC-Address then another user that is "
LOG_ERROR(Network, "You tried to use the same MAC-Address then another user that is "
"connected to the Room");
exit(1);
break;
case Network::RoomMember::State::WrongPassword:
NGLOG_ERROR(Network, "Room replied with: Wrong password");
LOG_ERROR(Network, "Room replied with: Wrong password");
exit(1);
break;
case Network::RoomMember::State::WrongVersion:
NGLOG_ERROR(Network,
LOG_ERROR(Network,
"You are using a different version then the room you are trying to connect to");
exit(1);
break;
@ -128,7 +128,7 @@ int main(int argc, char** argv) {
auto argv_w = CommandLineToArgvW(GetCommandLineW(), &argc_w);
if (argv_w == nullptr) {
NGLOG_CRITICAL(Frontend, "Failed to get command line arguments");
LOG_CRITICAL(Frontend, "Failed to get command line arguments");
return -1;
}
#endif
@ -170,7 +170,7 @@ int main(int argc, char** argv) {
break;
case 'i': {
const auto cia_progress = [](size_t written, size_t total) {
NGLOG_INFO(Frontend, "{:02d}%", (written * 100 / total));
LOG_INFO(Frontend, "{:02d}%", (written * 100 / total));
};
if (Service::AM::InstallCIA(std::string(optarg), cia_progress) !=
Service::AM::InstallStatus::Success)
@ -219,7 +219,7 @@ int main(int argc, char** argv) {
break;
case 'f':
fullscreen = true;
NGLOG_INFO(Frontend, "Starting in fullscreen mode...");
LOG_INFO(Frontend, "Starting in fullscreen mode...");
break;
case 'h':
PrintHelp(argv[0]);
@ -246,12 +246,12 @@ int main(int argc, char** argv) {
SCOPE_EXIT({ MicroProfileShutdown(); });
if (filepath.empty()) {
NGLOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
return -1;
}
if (!movie_record.empty() && !movie_play.empty()) {
NGLOG_CRITICAL(Frontend, "Cannot both play and record a movie");
LOG_CRITICAL(Frontend, "Cannot both play and record a movie");
return -1;
}
@ -281,28 +281,28 @@ int main(int argc, char** argv) {
switch (load_result) {
case Core::System::ResultStatus::ErrorGetLoader:
NGLOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filepath);
LOG_CRITICAL(Frontend, "Failed to obtain loader for {}!", filepath);
return -1;
case Core::System::ResultStatus::ErrorLoader:
NGLOG_CRITICAL(Frontend, "Failed to load ROM!");
LOG_CRITICAL(Frontend, "Failed to load ROM!");
return -1;
case Core::System::ResultStatus::ErrorLoader_ErrorEncrypted:
NGLOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before "
LOG_CRITICAL(Frontend, "The game that you are trying to load must be decrypted before "
"being used with Citra. \n\n For more information on dumping and "
"decrypting games, please refer to: "
"https://citra-emu.org/wiki/dumping-game-cartridges/");
return -1;
case Core::System::ResultStatus::ErrorLoader_ErrorInvalidFormat:
NGLOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
LOG_CRITICAL(Frontend, "Error while loading ROM: The ROM format is not supported.");
return -1;
case Core::System::ResultStatus::ErrorNotInitialized:
NGLOG_CRITICAL(Frontend, "CPUCore not initialized");
LOG_CRITICAL(Frontend, "CPUCore not initialized");
return -1;
case Core::System::ResultStatus::ErrorSystemMode:
NGLOG_CRITICAL(Frontend, "Failed to determine system mode!");
LOG_CRITICAL(Frontend, "Failed to determine system mode!");
return -1;
case Core::System::ResultStatus::ErrorVideoCore:
NGLOG_CRITICAL(Frontend, "VideoCore not initialized");
LOG_CRITICAL(Frontend, "VideoCore not initialized");
return -1;
case Core::System::ResultStatus::Success:
break; // Expected case
@ -314,11 +314,11 @@ int main(int argc, char** argv) {
if (auto member = Network::GetRoomMember().lock()) {
member->BindOnChatMessageRecieved(OnMessageReceived);
member->BindOnStateChanged(OnStateChanged);
NGLOG_DEBUG(Network, "Start connection to {}:{} with nickname {}", address, port,
LOG_DEBUG(Network, "Start connection to {}:{} with nickname {}", address, port,
nickname);
member->Join(nickname, address.c_str(), port, 0, Network::NoPreferredMac, password);
} else {
NGLOG_ERROR(Network, "Could not access RoomMember");
LOG_ERROR(Network, "Could not access RoomMember");
return 0;
}
}

View file

@ -27,17 +27,17 @@ bool Config::LoadINI(const std::string& default_contents, bool retry) {
const char* location = this->sdl2_config_loc.c_str();
if (sdl2_config->ParseError() < 0) {
if (retry) {
NGLOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location);
LOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location);
FileUtil::CreateFullPath(location);
FileUtil::WriteStringToFile(true, default_contents, location);
sdl2_config = std::make_unique<INIReader>(location); // Reopen file
return LoadINI(default_contents, false);
}
NGLOG_ERROR(Config, "Failed.");
LOG_ERROR(Config, "Failed.");
return false;
}
NGLOG_INFO(Config, "Successfully loaded {}", location);
LOG_INFO(Config, "Successfully loaded {}", location);
return true;
}

View file

@ -63,19 +63,19 @@ void EmuWindow_SDL2::Fullscreen() {
return;
}
NGLOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError());
LOG_ERROR(Frontend, "Fullscreening failed: {}", SDL_GetError());
// Try a different fullscreening method
NGLOG_INFO(Frontend, "Attempting to use borderless fullscreen...");
LOG_INFO(Frontend, "Attempting to use borderless fullscreen...");
if (SDL_SetWindowFullscreen(render_window, SDL_WINDOW_FULLSCREEN_DESKTOP) == 0) {
return;
}
NGLOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError());
LOG_ERROR(Frontend, "Borderless fullscreening failed: {}", SDL_GetError());
// Fallback algorithm: Maximise window.
// Works on all systems (unless something is seriously wrong), so no fallback for this one.
NGLOG_INFO(Frontend, "Falling back on a maximised window...");
LOG_INFO(Frontend, "Falling back on a maximised window...");
SDL_MaximizeWindow(render_window);
}
@ -87,7 +87,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
// Initialize the window
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
NGLOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting...");
LOG_CRITICAL(Frontend, "Failed to initialize SDL2! Exiting...");
exit(1);
}
@ -110,7 +110,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
if (render_window == nullptr) {
NGLOG_CRITICAL(Frontend, "Failed to create SDL2 window: {}", SDL_GetError());
LOG_CRITICAL(Frontend, "Failed to create SDL2 window: {}", SDL_GetError());
exit(1);
}
@ -121,12 +121,12 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
gl_context = SDL_GL_CreateContext(render_window);
if (gl_context == nullptr) {
NGLOG_CRITICAL(Frontend, "Failed to create SDL2 GL context: {}", SDL_GetError());
LOG_CRITICAL(Frontend, "Failed to create SDL2 GL context: {}", SDL_GetError());
exit(1);
}
if (!gladLoadGLLoader(static_cast<GLADloadproc>(SDL_GL_GetProcAddress))) {
NGLOG_CRITICAL(Frontend, "Failed to initialize GL functions: {}", SDL_GetError());
LOG_CRITICAL(Frontend, "Failed to initialize GL functions: {}", SDL_GetError());
exit(1);
}
@ -134,7 +134,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
SDL_PumpEvents();
SDL_GL_SetSwapInterval(Settings::values.use_vsync);
NGLOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname,
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname,
Common::g_scm_branch, Common::g_scm_desc);
DoneCurrent();