mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 08:14:18 +02:00
Make log function easier to be called
This commit is contained in:
parent
a3535f385f
commit
d2fb03e41c
@ -143,8 +143,8 @@ void writeLog(const wchar_t *logFileName, const char *log2write)
|
||||
SYSTEMTIME currentTime = {};
|
||||
::GetLocalTime(¤tTime);
|
||||
wstring dateTimeStrW = getDateTimeStrFrom(L"yyyy-MM-dd HH:mm:ss", currentTime);
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
std::string log2writeStr = converter.to_bytes(dateTimeStrW);
|
||||
wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
string log2writeStr = converter.to_bytes(dateTimeStrW);
|
||||
log2writeStr += " ";
|
||||
log2writeStr += log2write;
|
||||
log2writeStr += "\n";
|
||||
@ -157,6 +157,11 @@ void writeLog(const wchar_t *logFileName, const char *log2write)
|
||||
}
|
||||
}
|
||||
|
||||
void writeLog(const wchar_t* logFileName, const wchar_t* log2write)
|
||||
{
|
||||
string log2WriteA = wstring2string(log2write, CP_ACP);
|
||||
return writeLog(logFileName, log2WriteA.c_str());
|
||||
}
|
||||
|
||||
wstring folderBrowser(HWND parent, const wstring & title, int outputCtrlID, const wchar_t *defaultStr)
|
||||
{
|
||||
|
@ -59,6 +59,7 @@ void printStr(const wchar_t *str2print);
|
||||
std::wstring commafyInt(size_t n);
|
||||
|
||||
void writeLog(const wchar_t* logFileName, const char* log2write);
|
||||
void writeLog(const wchar_t* logFileName, const wchar_t* log2write);
|
||||
int filter(unsigned int code, struct _EXCEPTION_POINTERS *ep);
|
||||
std::wstring purgeMenuItemString(const wchar_t* menuItemStr, bool keepAmpersand = false);
|
||||
std::vector<std::wstring> tokenizeString(const std::wstring & tokenString, const char delim);
|
||||
|
Loading…
x
Reference in New Issue
Block a user