Files
MuditaOS/module-utils/log/log.cpp
Mateusz Grzegorzek 0c3cc549b6 [EGD-4706] Change log for RT1051 and Linux platform
Unify log for RT1051 and linux platform.
Add Logger class where common functions
for RT1051 and Linux are stored.
2021-01-11 12:39:15 +01:00

36 lines
868 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.hpp"
#include "Logger.hpp"
#include <ticks.hpp>
using Log::Logger;
void log_Printf(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
Logger::get().log(Log::Device::DEFAULT, fmt, args);
va_end(args);
}
void log_Log(logger_level level, const char *file, int line, const char *function, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
Logger::get().log(level, file, line, function, fmt, args);
va_end(args);
}
extern "C"
{
void bt_log_custom(const char *file, int line, const char *foo, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
Logger::get().log(LOGTRACE, file, line, foo, fmt, args);
va_end(args);
}
}