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

add log microseconds

parent 02eeaa6d
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ import ( ...@@ -13,6 +13,7 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"log"
"runtime/pprof" "runtime/pprof"
"strings" "strings"
"sync" "sync"
...@@ -31,7 +32,7 @@ import ( ...@@ -31,7 +32,7 @@ import (
"google.golang.org/grpc/grpclog" "google.golang.org/grpc/grpclog"
) )
var extantClient bool = false var extantClient = false
var loginMux sync.Mutex var loginMux sync.Mutex
var clientSingleton *Client var clientSingleton *Client
...@@ -165,6 +166,7 @@ func LogLevel(level int) error { ...@@ -165,6 +166,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.
Finish editing this message first!
Please register or to comment