forked from quic-go/quic-go
order log levels ascending
Make the log level numbers more intuitive. Logging nothing is now log level 0, debug logging is level 3.
This commit is contained in:
@@ -29,6 +29,13 @@ var _ = Describe("Log", func() {
|
||||
timeFormat = initialTimeFormat
|
||||
})
|
||||
|
||||
It("the log level has the correct numeric value", func() {
|
||||
Expect(LogLevelNothing).To(BeEquivalentTo(0))
|
||||
Expect(LogLevelError).To(BeEquivalentTo(1))
|
||||
Expect(LogLevelInfo).To(BeEquivalentTo(2))
|
||||
Expect(LogLevelDebug).To(BeEquivalentTo(3))
|
||||
})
|
||||
|
||||
It("log level nothing", func() {
|
||||
SetLogLevel(LogLevelNothing)
|
||||
Debugf("debug")
|
||||
@@ -92,7 +99,7 @@ var _ = Describe("Log", func() {
|
||||
|
||||
It("reads log level from env", func() {
|
||||
Expect(logLevel).To(Equal(LogLevelNothing))
|
||||
os.Setenv(logEnv, "1")
|
||||
os.Setenv(logEnv, "3")
|
||||
readLoggingEnv()
|
||||
Expect(logLevel).To(Equal(LogLevelDebug))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user