Skip to content

Commit

Permalink
fix: do not log failed log connection attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Orzelius committed Nov 30, 2022
1 parent 3524401 commit 58a1ae7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/src/plugins/kubernetes/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,12 @@ export class K8sLogFollower<T> {
this.log.silly(`<Connected to container '${containerName}' in Pod '${pod.metadata.name}'>`)
} catch (err) {
// Log the error and keep trying.
this.log.debug(
`<Getting logs for container '${containerName}' in Pod '${pod.metadata.name}' failed with error: ${err?.message}>`
)
// If the error is "HTTP request failed" most likely the pod is just not up yet
if (err.message !== "HTTP request failed") {
this.log.debug(
`<Getting logs for container '${containerName}' in Pod '${pod.metadata.name}' failed with error: ${err?.message}>`
)
}
return
}
this.connections[connectionId] = {
Expand Down

0 comments on commit 58a1ae7

Please sign in to comment.