Removed references to SHLogger in Debug.cxx

This commit is contained in:
Kah Wei 2022-09-13 20:31:08 +08:00
parent 0c28199acf
commit 8e45b5895e
1 changed files with 11 additions and 14 deletions

View File

@ -18,11 +18,8 @@ of DigiPen Institute of Technology is prohibited.
#include "Debug.hxx" #include "Debug.hxx"
// Standard Libraries // Standard Libraries
#include <sstream> #include <sstream>
// External Dependencies
#include "Tools/SHLogger.h"
// Project Headers // Project Headers
#include "Convert.hxx" #include "Convert.hxx"
#include "SHLog.h"
namespace SHADE namespace SHADE
{ {
@ -31,11 +28,11 @@ namespace SHADE
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
void Debug::Log(const std::string& str) void Debug::Log(const std::string& str)
{ {
SHLog::Info(str); std::cout << str << std::endl;
} }
void Debug::Log(System::String^ str) void Debug::Log(System::String^ str)
{ {
SHLog::Info(Convert::ToNative(str)); System::Console::WriteLine(str);
} }
void Debug::Log(System::String^ str, Object^ owner) void Debug::Log(System::String^ str, Object^ owner)
@ -50,15 +47,15 @@ namespace SHADE
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "[" << throwerName << "] " << Convert::ToNative(str); oss << "[" << throwerName << "] " << Convert::ToNative(str);
SHLog::Info(oss.str()); std::cout << oss.str() << std::endl;
} }
void Debug::LogWarning(const std::string& str) void Debug::LogWarning(const std::string& str)
{ {
SHLog::Warning(str); std::cout << str << std::endl;
} }
void Debug::LogWarning(System::String^ str) void Debug::LogWarning(System::String^ str)
{ {
SHLog::Warning(Convert::ToNative(str)); System::Console::WriteLine(str);
} }
void Debug::LogWarning(System::String^ str, Object^ thrower) void Debug::LogWarning(System::String^ str, Object^ thrower)
{ {
@ -73,15 +70,15 @@ namespace SHADE
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "[" << throwerName << "] " << Convert::ToNative(str); oss << "[" << throwerName << "] " << Convert::ToNative(str);
SHLog::Warning(oss.str()); std::cout << oss.str() << std::endl;
} }
void Debug::LogError(const std::string& str) void Debug::LogError(const std::string& str)
{ {
SHLog::Error(str); std::cout << str << std::endl;
} }
void Debug::LogError(System::String^ str) void Debug::LogError(System::String^ str)
{ {
SHLog::Error(Convert::ToNative(str)); System::Console::WriteLine(str);
} }
void Debug::LogError(System::String^ str, Object^ thrower) void Debug::LogError(System::String^ str, Object^ thrower)
{ {
@ -91,7 +88,7 @@ namespace SHADE
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "[" << throwerName << "] -> " << Convert::ToNative(str); oss << "[" << throwerName << "] -> " << Convert::ToNative(str);
SHLog::Error(oss.str()); std::cout << oss.str() << std::endl;
} }
void Debug::LogError(System::String^ str, System::String^ throwerName) void Debug::LogError(System::String^ str, System::String^ throwerName)
{ {
@ -114,12 +111,12 @@ namespace SHADE
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "[" << throwerName << "] Unhandled exception: " << Convert::ToNative(exception->ToString()); oss << "[" << throwerName << "] Unhandled exception: " << Convert::ToNative(exception->ToString());
SHLog::Error(oss.str()); std::cout << oss.str() << std::endl;
} }
void Debug::LogExceptionNative(const std::exception& exception, const std::string& throwerName) void Debug::LogExceptionNative(const std::exception& exception, const std::string& throwerName)
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "[" << throwerName << "] Unhandled exception: " << exception.what(); oss << "[" << throwerName << "] Unhandled exception: " << exception.what();
SHLog::Error(oss.str()); std::cout << oss.str() << std::endl;
} }
} }