Skip to content
Snippets Groups Projects
Commit 686c6fca authored by Jake Taylor's avatar Jake Taylor
Browse files

add log microseconds

parent d92a7b06
Branches
Tags
1 merge request!510Release
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman" jww "github.com/spf13/jwalterweatherman"
"google.golang.org/grpc/grpclog" "google.golang.org/grpc/grpclog"
"log"
) )
// sets level of logging. All logs the set level and above will be displayed // sets level of logging. All logs the set level and above will be displayed
...@@ -25,6 +26,7 @@ func LogLevel(level int) error { ...@@ -25,6 +26,7 @@ func LogLevel(level int) error {
threshold := jww.Threshold(level) threshold := jww.Threshold(level)
jww.SetLogThreshold(threshold) jww.SetLogThreshold(threshold)
jww.SetStdoutThreshold(threshold) jww.SetStdoutThreshold(threshold)
jww.SetFlags(log.LstdFlags | log.Lmicroseconds)
switch threshold { switch threshold {
case jww.LevelTrace: case jww.LevelTrace:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment