mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-03 20:48:59 +01:00
9f951c8fb5
Add human-readable log output. It prints out the exact source code line information.
11 lines
262 B
Go
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())
|
|
}
|