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

Change token logging to trace level (#2247) #2248

Merged

Conversation

zc-devs
Copy link
Contributor

@zc-devs zc-devs commented Aug 18, 2023

Changed from info to trace.

Backport of #2247.

Tested on v1.0.2.

Info level:

{"level":"info","time":"2023-08-18T17:10:28Z","message":"no agent config found at '/etc/woodpecker/agent.conf', start with defaults"}
{"level":"error","error":"open /etc/woodpecker/agent.conf: no such file or directory","time":"2023-08-18T17:10:28Z","message":"could not persist agent config at '/etc/woodpecker/agent.conf'"}
{"level":"info","time":"2023-08-18T17:10:28Z","message":"Starting Woodpecker agent with version 'next-d3b96f38' and backend 'kubernetes' using platform 'linux/amd64' running up to 1 pipelines in parallel"}

Trace level:

{"level":"info","time":"2023-08-18T17:06:12Z","caller":"/src/cmd/agent/config.go:41","message":"no agent config found at '/etc/woodpecker/agent.conf', start with defaults"}
{"level":"trace","token":"eyJh...VCJ9.eyJp...1MH0.DHYi...3VIc","time":"2023-08-18T17:06:12Z","caller":"/src/agent/rpc/auth_interceptor.go:96","message":"Token refreshed"}
{"level":"error","error":"open /etc/woodpecker/agent.conf: no such file or directory","time":"2023-08-18T17:06:12Z","caller":"/src/cmd/agent/config.go:70","message":"could not persist agent config at '/etc/woodpecker/agent.conf'"}
{"level":"debug","time":"2023-08-18T17:06:12Z","caller":"/src/cmd/agent/agent.go:200","message":"Agent registered with ID 50"}
{"level":"debug","time":"2023-08-18T17:06:12Z","caller":"/src/cmd/agent/agent.go:223","message":"loaded kubernetes backend engine"}
{"level":"info","time":"2023-08-18T17:06:12Z","caller":"/src/cmd/agent/agent.go:247","message":"Starting Woodpecker agent with version 'next-d3b96f38' and backend 'kubernetes' using platform 'linux/amd64' running up to 1 pipelines in parallel"}
{"level":"debug","time":"2023-08-18T17:06:12Z","caller":"/src/cmd/agent/agent.go:231","message":"created new runner 0"}
{"level":"debug","time":"2023-08-18T17:06:12Z","caller":"/src/cmd/agent/agent.go:238","message":"polling new steps"}
{"level":"debug","time":"2023-08-18T17:06:12Z","caller":"/src/agent/runner.go:54","message":"request next execution"}

@6543 6543 changed the title Change token logging to trace level (backport) Change token logging to trace level (#2247) Aug 18, 2023
@6543 6543 added security agent enhancement improve existing features labels Aug 18, 2023
@6543 6543 added this to the 1.0.3 milestone Aug 18, 2023
@6543 6543 enabled auto-merge (squash) August 18, 2023 19:01
@6543 6543 merged commit c96faa4 into woodpecker-ci:release/v1.0 Aug 18, 2023
@zc-devs zc-devs deleted the fix-token-refresh-logging-backport branch November 3, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent enhancement improve existing features security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants