Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c7de02

Browse files
committed
change rotate key logs to debug
1 parent4b8a30e commit5c7de02

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

‎cli/server_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,18 +273,22 @@ func TestServer(t *testing.T) {
273273
}
274274

275275
countLines:=func(fullOutputstring,terminalWidthint)int {
276-
lines:=strings.Split(fullOutput,"\n")
277-
count:=0
276+
linesByNewline:=strings.Split(fullOutput,"\n")
277+
countByWidth:=0
278278
lineLoop:
279-
for_,line:=rangelines {
279+
for_,line:=rangelinesByNewline {
280280
for_,ignoreLine:=rangeignoreLines {
281281
ifstrings.Contains(line,ignoreLine) {
282282
continue lineLoop
283283
}
284284
}
285-
count+= (len(line)+terminalWidth-1)/terminalWidth
285+
ifline=="" {
286+
countByWidth++
287+
}else {
288+
countByWidth+= (len(line)+terminalWidth-1)/terminalWidth
289+
}
286290
}
287-
returncount
291+
returncountByWidth
288292
}
289293

290294
terminalWidth:=80

‎coderd/cryptokeys/rotate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (k *rotator) rotateKeys(ctx context.Context) error {
152152
}
153153
}
154154
ifvalidKeys==0 {
155-
k.logger.Info(ctx,"no valid keys detected, inserting new key",
155+
k.logger.Debug(ctx,"no valid keys detected, inserting new key",
156156
slog.F("feature",feature),
157157
)
158158
_,err:=k.insertNewKey(ctx,tx,feature,now)
@@ -194,7 +194,7 @@ func (k *rotator) insertNewKey(ctx context.Context, tx database.Store, feature d
194194
return database.CryptoKey{},xerrors.Errorf("inserting new key: %w",err)
195195
}
196196

197-
k.logger.Info(ctx,"inserted new key for feature",slog.F("feature",feature))
197+
k.logger.Debug(ctx,"inserted new key for feature",slog.F("feature",feature))
198198
returnnewKey,nil
199199
}
200200

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp