You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v2ray-core/common/log/log_test.go

20 lines
428 B

package log
import (
"testing"
"github.com/v2ray/v2ray-core/testing/unit"
)
func TestLogLevelSetting(t *testing.T) {
assert := unit.Assert(t)
assert.Pointer(debugLogger).Equals(noOpLoggerInstance)
SetLogLevel(DebugLevel)
assert.Pointer(debugLogger).Equals(streamLoggerInstance)
SetLogLevel(InfoLevel)
assert.Pointer(debugLogger).Equals(noOpLoggerInstance)
assert.Pointer(infoLogger).Equals(streamLoggerInstance)
}