mirror of
https://github.com/mudita/MuditaOS.git
synced 2025-12-23 22:17:57 -05:00
Fixes and optimizations in logger: * fixed possible buffer overflow when logging logs over line buffer size; * reduced max log line length to 2048; * moved pubsetbuf before file opening; * log file stream buffer created once in logger ctor; * updatet UTs; * additional minor cleanup.
22 lines
526 B
C++
22 lines
526 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include <log/log.hpp>
|
|
#include <cstdarg>
|
|
__attribute__((weak)) int log_Log(
|
|
LoggerLevel level, const char *file, int line, const char *function, const char *fmt, ...)
|
|
{
|
|
va_list args;
|
|
va_start(args, fmt);
|
|
va_end(args);
|
|
return 0;
|
|
}
|
|
|
|
__attribute__((weak)) int log_Printf(const char *fmt, ...)
|
|
{
|
|
va_list args;
|
|
va_start(args, fmt);
|
|
va_end(args);
|
|
return 0;
|
|
}
|