Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use log 1.9.3 [INF] style color output format #24

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ Server example [sampleServer](sampleServer/main.go)
Previous style (non structured json, no color log format):
```bash
% go run . -config-dir ./config -config-port 8888 -logger-no-color -logger-json=false a b
14:50:54 I updater.go:47> Configmap flag value watching on ./config
14:50:54 I updater.go:156> updating loglevel to "verbose\n"
14:50:54 I logger.go:183> Log level is now 1 Verbose (was 2 Info)
14:50:54 I updater.go:97> Now watching . and config
14:50:54 I updater.go:162> Background thread watching config now running
14:50:54 I scli.go:81> Fortio scli dev dflag config server listening on [::]:8888
14:50:54 I scli.go:90> Starting sampleServer dev go1.20.3 arm64 darwin
14:50:55 I main.go:16> FD count 1s after start : 16
14:50:54 [I] updater.go:47> Configmap flag value watching on ./config
14:50:54 [I] updater.go:156> updating loglevel to "verbose\n"
14:50:54 [I] logger.go:183> Log level is now 1 Verbose (was 2 Info)
14:50:54 [I] updater.go:97> Now watching . and config
14:50:54 [I] updater.go:162> Background thread watching config now running
14:50:54 [I] scli.go:81> Fortio scli dev dflag config server listening on [::]:8888
14:50:54 [I] scli.go:90> Starting sampleServer dev go1.20.3 arm64 darwin
14:50:55 [I] main.go:16> FD count 1s after start : 16
# When visiting the UI
14:51:10 I http_logging.go:73> ListFlags, method="GET", url="/", proto="HTTP/1.1", remote_addr="[::1]:59034",
14:51:15 I main.go:18> FD count 20s later : 16
14:51:15 I main.go:21> FD count stability check: 16
14:51:15 I main.go:21> FD count stability check: 16
14:51:15 I main.go:21> FD count stability check: 16
14:51:15 I main.go:21> FD count stability check: 16
14:51:15 I main.go:21> FD count stability check: 16
14:51:15 I main.go:27> Running until interrupted (ctrl-c)...
14:51:10 [I] http_logging.go:73> ListFlags, method="GET", url="/", proto="HTTP/1.1", remote_addr="[::1]:59034",
14:51:15 [I] main.go:18> FD count 20s later : 16
14:51:15 [I] main.go:21> FD count stability check: 16
14:51:15 [I] main.go:21> FD count stability check: 16
14:51:15 [I] main.go:21> FD count stability check: 16
14:51:15 [I] main.go:21> FD count stability check: 16
14:51:15 [I] main.go:21> FD count stability check: 16
14:51:15 [I] main.go:27> Running until interrupted (ctrl-c)...
# pkill -int sampleServer
14:51:20 W scli.go:101> Interrupt received.
14:51:20 I main.go:29> Normal exit
14:51:20 [W] scli.go:101> Interrupt received.
14:51:20 [I] main.go:29> Normal exit
% echo $?
0
```
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
fortio.org/cli v1.3.1
fortio.org/dflag v1.5.2
fortio.org/log v1.9.2
fortio.org/log v1.9.3
fortio.org/version v1.0.2
golang.org/x/sys v0.10.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ fortio.org/cli v1.3.1 h1:ExJyciUTLLY1gznExrthduDyw0jKKP95UKrMGfh+n+8=
fortio.org/cli v1.3.1/go.mod h1:R4+pCDYD+40fvomN0yg+CZmU6gkA1PrsunR2hy0dfts=
fortio.org/dflag v1.5.2 h1:F9XVRj4Qr2IbJP7BMj7XZc9wB0Q/RZ61Ool+4YPVad8=
fortio.org/dflag v1.5.2/go.mod h1:ppb/A8u+KKg+qUUYZNYuvRnXuVb8IsdHb/XGzsmjkN8=
fortio.org/log v1.9.2 h1:rVCzSFhTD+lsdGUhVuTWoqdFjJP+XD3da9p09pwPohY=
fortio.org/log v1.9.2/go.mod h1:u/8/2lyczXq52aT5Nw6reD+3cR6m/EbS2jBiIYhgiTU=
fortio.org/log v1.9.3 h1:rkgDmgF7dLfNRtVOE44Av5KBlro8FkpTKnTnphHy074=
fortio.org/log v1.9.3/go.mod h1:u/8/2lyczXq52aT5Nw6reD+3cR6m/EbS2jBiIYhgiTU=
fortio.org/sets v1.0.3 h1:HzewdGjH69YmyW06yzplL35lGr+X4OcqQt0qS6jbaO4=
fortio.org/sets v1.0.3/go.mod h1:QZVj0r6KP/ZD9ebySW9SgxVNy/NjghUfyHW9NN+WU+4=
fortio.org/version v1.0.2 h1:8NwxdX58aoeKx7T5xAPO0xlUu1Hpk42nRz5s6e6eKZ0=
Expand Down