mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-08 03:46:52 +01:00
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"}
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
func TestLog(t *testing.T) {
|
||||
// Init("debug", "test.log")
|
||||
// Init("error", []string{"stdout", "test.log"})
|
||||
|
||||
Info("Test log.Info", " value is ", 10)
|
||||
Infof("Test log.Infof %d", 10)
|
||||
|
||||
Reference in New Issue
Block a user