api: truncate long log lines with …
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
7a6bab7f04
commit
41b77964ca
@ -33,8 +33,10 @@ LoggerLog(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Function, _In_z_ c
|
|||||||
{
|
{
|
||||||
WCHAR Combined[0x400];
|
WCHAR Combined[0x400];
|
||||||
if (_snwprintf_s(Combined, _countof(Combined), _TRUNCATE, L"%s: %s", Function, LogLine) == -1)
|
if (_snwprintf_s(Combined, _countof(Combined), _TRUNCATE, L"%s: %s", Function, LogLine) == -1)
|
||||||
Logger(Level, LogLine);
|
{
|
||||||
else
|
Combined[_countof(Combined) - 2] = L'\u2026'; /* Horizontal Ellipsis */
|
||||||
|
Combined[_countof(Combined) - 1] = 0;
|
||||||
|
}
|
||||||
Logger(Level, Combined);
|
Logger(Level, Combined);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user