From fcf42bbe8a6df96818bea10a012e790d66e6b38a Mon Sep 17 00:00:00 2001 From: NarcolepticK Date: Thu, 21 Jun 2018 00:37:06 -0400 Subject: [PATCH] service/service: Migrate logging macros --- src/core/hle/service/service.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 55eb8e5eb..7defd40b4 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -94,16 +94,15 @@ void Interface::HandleSyncRequest(SharedPtr server_session) { std::string function_name = (itr == m_functions.end()) ? Common::StringFromFormat("0x%08X", cmd_buff[0]) : itr->second.name; - LOG_ERROR( - Service, "unknown / unimplemented %s", - MakeFunctionString(function_name.c_str(), GetPortName().c_str(), cmd_buff).c_str()); + NGLOG_ERROR(Service, "unknown / unimplemented {}", + MakeFunctionString(function_name.c_str(), GetPortName().c_str(), cmd_buff)); // TODO(bunnei): Hack - ignore error cmd_buff[1] = 0; return; } - LOG_TRACE(Service, "%s", - MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff).c_str()); + NGLOG_TRACE(Service, "{}", + MakeFunctionString(itr->second.name, GetPortName().c_str(), cmd_buff)); itr->second.func(this); } @@ -160,7 +159,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(u32* cmd_buf, const Funct } buf.push_back('}'); - LOG_ERROR(Service, "unknown / unimplemented %s", fmt::to_string(buf).c_str()); + NGLOG_ERROR(Service, "unknown / unimplemented {}", fmt::to_string(buf)); // TODO(bunnei): Hack - ignore error cmd_buf[1] = 0; } @@ -181,8 +180,7 @@ void ServiceFrameworkBase::HandleSyncRequest(SharedPtr server_ses context.PopulateFromIncomingCommandBuffer(cmd_buf, *Kernel::g_current_process, Kernel::g_handle_table); - LOG_TRACE(Service, "%s", - MakeFunctionString(info->name, GetServiceName().c_str(), cmd_buf).c_str()); + NGLOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName().c_str(), cmd_buf)); handler_invoker(this, info->handler_callback, context); auto thread = Kernel::GetCurrentThread(); @@ -267,7 +265,7 @@ void Init(std::shared_ptr& sm) { AddService(new SSL::SSL_C); Y2R::InstallInterfaces(*sm); - LOG_DEBUG(Service, "initialized OK"); + NGLOG_DEBUG(Service, "initialized OK"); } /// Shutdown ServiceManager @@ -278,6 +276,6 @@ void Shutdown() { FS::ArchiveShutdown(); g_kernel_named_ports.clear(); - LOG_DEBUG(Service, "shutdown OK"); + NGLOG_DEBUG(Service, "shutdown OK"); } } // namespace Service