History

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.

Martin Storsjö committed 12 years ago

Commit cfc93671 parent 90be3d83 files · +1 −13Browse files

Unified · Split

3 files
  1. codec/common/inc/logging.h +0 −3
  2. codec/common/src/logging.cpp +1 −9
  3. codec/common/src/welsCodecTrace.cpp +0 −1
codec/common/inc/logging.h+0−3
@@ -35,9 +35,6 @@ · 34 unmodified lines
3535 #ifndef WELS_LOGGING_H__
3636 #define WELS_LOGGING_H__
3737
38−// API surface.
39−void WelsStderrSetTraceLevel (int32_t level);
40−
4138
4239 // Internal details.
4340 int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap);
codec/common/src/logging.cpp+1−9
@@ -35,15 +35,7 @@ · 34 unmodified lines
3535 #include <stdio.h>
3636 #include "typedefs.h"
3737
38−static int32_t g_TraceLevel = 0;
39−
40−void WelsStderrSetTraceLevel (int32_t level) {
41− g_TraceLevel = level;
42−}
43−
4438 int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap) {
45− if (level < g_TraceLevel) {
46− vfprintf (stderr, format, ap);
47− }
39+ vfprintf (stderr, format, ap);
4840 return 0;
4941 }
codec/common/src/welsCodecTrace.cpp+0−1
@@ -108,7 +108,6 @@ void welsCodecTrace::CODEC_TRACE (void* ignore, const int32_t iLevel, const char · 107 unmodified lines
108108 void welsCodecTrace::SetTraceLevel (const int32_t iLevel) {
109109 if (iLevel >= 0)
110110 m_iTraceLevel = iLevel;
111− WelsStderrSetTraceLevel (iLevel);
112111 }
113112
114113

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t