Cubeb: check correct log level
This commit is contained in:
parent
369502b49b
commit
d933e58d9a
|
@ -25,7 +25,8 @@ static void LogCallback(const char* format, ...)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
constexpr auto log_type = Common::Log::LogType::AUDIO;
|
constexpr auto log_type = Common::Log::LogType::AUDIO;
|
||||||
if (!instance->IsEnabled(log_type))
|
constexpr auto log_level = Common::Log::LogLevel::LINFO;
|
||||||
|
if (!instance->IsEnabled(log_type, log_level))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
|
@ -36,8 +37,7 @@ static void LogCallback(const char* format, ...)
|
||||||
const std::string message = StringFromFormatV(adapted_format.c_str(), args);
|
const std::string message = StringFromFormatV(adapted_format.c_str(), args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
instance->LogWithFullPath(Common::Log::LogLevel::LINFO, log_type, filename, lineno,
|
instance->LogWithFullPath(log_level, log_type, filename, lineno, message.c_str());
|
||||||
message.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DestroyContext(cubeb* ctx)
|
static void DestroyContext(cubeb* ctx)
|
||||||
|
|
Loading…
Reference in New Issue