netbird/formatter/set.go
Zoltan Papp 9f951c8fb5
Add human-readbale log output (#681)
Add human-readable log output. It prints out the exact source code line information.
2023-02-27 12:20:07 +01:00

11 lines
262 B
Go

package formatter
import "github.com/sirupsen/logrus"
// SetTextFormatter set the formatter for given logger.
func SetTextFormatter(logger *logrus.Logger) {
logger.Formatter = NewTextFormatter()
logger.ReportCaller = true
logger.AddHook(NewContextHook())
}