자잘한 버그 해결
This commit is contained in:
@@ -24,20 +24,20 @@ void setDefaultLogger(spdlog::level::level_enum logLevel, gsl::czstring logFileN
|
||||
|
||||
void critical(gsl::czstring msg) {
|
||||
#ifdef _WIN32
|
||||
gsl::zstring msgbuf = nullptr;
|
||||
FormatMessageA(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
WSAGetLastError(),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
msgbuf,
|
||||
0,
|
||||
NULL);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
LocalFree(msgbuf);
|
||||
LPSTR msgbuf = nullptr;
|
||||
FormatMessageA(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
WSAGetLastError(),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPSTR)&msgbuf,
|
||||
0,
|
||||
NULL);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
LocalFree(msgbuf);
|
||||
#elif __linux__
|
||||
gsl::czstring msgbuf = strerror(errno);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
gsl::czstring msgbuf = strerror(errno);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
#else
|
||||
#error "이 플랫폼은 지원되지 않습니다."
|
||||
#endif
|
||||
@@ -46,20 +46,20 @@ void critical(gsl::czstring msg) {
|
||||
|
||||
void error(gsl::czstring msg) {
|
||||
#ifdef _WIN32
|
||||
gsl::zstring msgbuf = nullptr;
|
||||
FormatMessageA(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
WSAGetLastError(),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
msgbuf,
|
||||
0,
|
||||
NULL);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
LocalFree(msgbuf);
|
||||
LPSTR msgbuf = nullptr;
|
||||
FormatMessageA(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL,
|
||||
WSAGetLastError(),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPSTR)&msgbuf,
|
||||
0,
|
||||
NULL);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
LocalFree(msgbuf);
|
||||
#elif __linux__
|
||||
gsl::czstring msgbuf = strerror(errno);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
gsl::czstring msgbuf = strerror(errno);
|
||||
spdlog::critical("[{}] {}", msg, msgbuf);
|
||||
#else
|
||||
#error "이 플랫폼은 지원되지 않습니다."
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user