github.com/codingeasygo/util@v0.0.0-20231206062002-1ce2f004b7d9/proxy/http/log_test.go (about)

     1  package http
     2  
     3  import "testing"
     4  
     5  func TestLog(t *testing.T) {
     6  	//
     7  	SetLogLevel(LogLevelDebug)
     8  	DebugLog("debug")
     9  	InfoLog("info")
    10  	WarnLog("warn")
    11  	ErrorLog("error")
    12  	//
    13  	SetLogLevel(LogLevelInfo)
    14  	DebugLog("debug")
    15  	InfoLog("info")
    16  	WarnLog("warn")
    17  	ErrorLog("error")
    18  	//
    19  	SetLogLevel(LogLevelWarn)
    20  	DebugLog("debug")
    21  	InfoLog("info")
    22  	WarnLog("warn")
    23  	ErrorLog("error")
    24  	//
    25  	SetLogLevel(LogLevelError)
    26  	DebugLog("debug")
    27  	InfoLog("info")
    28  	WarnLog("warn")
    29  	ErrorLog("error")
    30  	//
    31  	SetLogLevel(1)
    32  	ErrorLog("error")
    33  }