cli
cli copied to clipboard
[Bug] The Web Interface doesn't respect --log-level
What are you really trying to do?
Describe the bug
GET requests being populated in the stdout when --log-level warn
is set
Minimal Reproduction
- Run
temporal server start-dev --log-level warn
- Go to
localhost:8233
- Open up your terminal and notice a bunch of logs you shouldn't see just from visiting the webui
Environment/Versions
- OS and processor: M1 Mac
- Temporal Version: v0.8.0
- Are you using Docker or Kubernetes or building Temporal from source? Built from source (i.e. [temporal_cli_0.8.0_darwin_arm64.tar.gz]. (https://github.com/temporalio/cli/releases/download/v0.8.0/temporal_cli_0.8.0_darwin_arm64.tar.gz))
Additional context
Thanks for reporting, we're working to fix it.
This also happens when using --log-format=pretty
since the web UI keeps printing in json format:
❯ temporal server start-dev --log-level=warn --log-format=pretty --ip 0.0.0.0 --db-filename /tmp/temporal.db
Starting UI server...
____ __
/ __/___/ / ___
/ _// __/ _ \/ _ \
/___/\__/_//_/\___/ v4.9.0
High performance, minimalist Go web framework
https://echo.labstack.com
____________________________________O/_______
O\
⇨ http server started on [::]:8233
{"time":"2023-04-19T19:03:34.134408-03:00","id":"","remote_ip":"127.0.0.1","host":"localhost:8233","method":"GET","uri":"/_app/version.json","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","status":200,"error":"","latency":4144604,"latency_human":"4.144604ms","bytes_in":0,"bytes_out":27}
{"time":"2023-04-19T19:03:34.186391-03:00","id":"","remote_ip":"127.0.0.1","host":"localhost:8233","method":"GET","uri":"/namespaces/default/workflows?query=&search=basic","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","status":200,"error":"","latency":28996,"latency_human":"28.996µs","bytes_in":0,"bytes_out":1193}
{"time":"2023-04-19T19:03:34.521378-03:00","id":"","remote_ip":"127.0.0.1","host":"localhost:8233","method":"GET","uri":"/_app/immutable/entry/start.d4bd6572.js","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","status":200,"error":"","latency":128214,"latency_human":"128.214µs","bytes_in":0,"bytes_out":23056}
{"time":"2023-04-19T19:03:34.521849-03:00","id":"","remote_ip":"127.0.0.1","host":"localhost:8233","method":"GET","uri":"/_app/immutable/entry/app.9ded9747.js","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","status":200,"error":"","latency":176679,"latency_human":"176.679µs","bytes_in":0,"bytes_out":53970}
{"time":"2023-04-19T19:03:34.543261-03:00","id":"","remote_ip":"127.0.0.1","host":"localhost:8233","method":"GET","uri":"/_app/immutable/chunks/index.a36c9cb0.js","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","status":200,"error":"","latency":159421,"latency_human":"159.421µs","bytes_in":0,"bytes_out":16093}
...
Testing on the rewrite the web UI still doesn't respect the log level, but that is because we are always hiding the logs for the UI now by https://github.com/temporalio/cli/pull/441 @cretz is this intentional?
It is intentional to hide web output because we didn't build the full logger integration and the web code was writing to stdout/stderr directly in some cases. But if we think this is important, we can probably provide our same slog to the UI logger. I have no strong opinion.
I don't get it... will the web logs respect the "log-level" setting?