Remove WelsStderrSetTraceLevel
The logging level is checked in welsCodecTrace anyway. Previously, error logging wasn't ever shown if the trace level was set to WELS_LOG_ERROR (as it was by default), since welsStderrLevelTrace required the message level to be strictly lower than the trace level.
This commit is contained in:
@@ -35,9 +35,6 @@
|
|||||||
#ifndef WELS_LOGGING_H__
|
#ifndef WELS_LOGGING_H__
|
||||||
#define WELS_LOGGING_H__
|
#define WELS_LOGGING_H__
|
||||||
|
|
||||||
// API surface.
|
|
||||||
void WelsStderrSetTraceLevel (int32_t level);
|
|
||||||
|
|
||||||
|
|
||||||
// Internal details.
|
// Internal details.
|
||||||
int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap);
|
int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap);
|
||||||
|
|||||||
@@ -35,15 +35,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "typedefs.h"
|
#include "typedefs.h"
|
||||||
|
|
||||||
static int32_t g_TraceLevel = 0;
|
|
||||||
|
|
||||||
void WelsStderrSetTraceLevel (int32_t level) {
|
|
||||||
g_TraceLevel = level;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap) {
|
int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap) {
|
||||||
if (level < g_TraceLevel) {
|
|
||||||
vfprintf (stderr, format, ap);
|
vfprintf (stderr, format, ap);
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,6 @@ void welsCodecTrace::CODEC_TRACE (void* ignore, const int32_t iLevel, const char
|
|||||||
void welsCodecTrace::SetTraceLevel (const int32_t iLevel) {
|
void welsCodecTrace::SetTraceLevel (const int32_t iLevel) {
|
||||||
if (iLevel >= 0)
|
if (iLevel >= 0)
|
||||||
m_iTraceLevel = iLevel;
|
m_iTraceLevel = iLevel;
|
||||||
WelsStderrSetTraceLevel (iLevel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user