Files
hermez-node/log/log_test.go
arnaucube dffc7e2f4e Add opt to disable print logs but storing to file
By default outputs contains "stdout", which prints the logs at the
output of the process. To add a log file as output, the path should be
added at the outputs array. To avoid printing the logs but storing them
on a file, can use []string{"pathtofile.log"}
2021-01-12 18:55:05 +01:00

20 lines
450 B
Go

package log
import (
"testing"
)
func TestLog(t *testing.T) {
// Init("error", []string{"stdout", "test.log"})
Info("Test log.Info", " value is ", 10)
Infof("Test log.Infof %d", 10)
Infow("Test log.Infow", "value", 10)
Debugf("Test log.Debugf %d", 10)
Error("Test log.Error", " value is ", 10)
Errorf("Test log.Errorf %d", 10)
Errorw("Test log.Errorw", "value", 10)
Warnf("Test log.Warnf %d", 10)
Warnw("Test log.Warnw", "value", 10)
}