2018-05-27 22:40:42 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2018-07-24 14:42:03 +08:00
|
|
|
func TestLoggerCreateBasics(t *testing.T) {
|
2018-05-27 22:40:42 +08:00
|
|
|
logger = nil
|
|
|
|
|
2018-07-24 14:42:03 +08:00
|
|
|
if err := loggerCreate(); err != nil {
|
2018-05-27 22:40:42 +08:00
|
|
|
t.Errorf("unexpected error creating logger: %v", err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if logger == nil {
|
2018-07-24 14:42:03 +08:00
|
|
|
t.Errorf("logger null after loggerCreate()")
|
2018-05-27 22:40:42 +08:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
logger.Debugf("test message please ignore")
|
|
|
|
}
|