cirruslabs / cirrus-cli

CLI for executing Cirrus tasks locally and in any CI
GNU Affero General Public License v3.0
204 stars 18 forks source link

Don't instantiate a new echelon logger for each standby instance #750

Closed edigaryev closed 3 months ago

edigaryev commented 3 months ago

To prevent the goroutine leak.

goroutine 10015 [chan receive, 52483 minutes]:
github.com/cirruslabs/echelon.(*Logger).streamEntries(0x140006b7000, {0x103d46390, 0x140007a2a20})
    /go/pkg/mod/github.com/cirruslabs/echelon@v1.9.0/logger.go:74 +0x40
created by github.com/cirruslabs/echelon.NewLogger in goroutine 1
    /go/pkg/mod/github.com/cirruslabs/echelon@v1.9.0/logger.go:52 +0xe4

goroutine 8 [chan receive, 55062 minutes]:
github.com/cirruslabs/echelon.(*Logger).streamEntries(0x14000052740, {0x103d46390, 0x140004801b0})
    /go/pkg/mod/github.com/cirruslabs/echelon@v1.9.0/logger.go:74 +0x40
created by github.com/cirruslabs/echelon.NewLogger in goroutine 1
    /go/pkg/mod/github.com/cirruslabs/echelon@v1.9.0/logger.go:52 +0xe4

goroutine 20493 [chan receive, 50209 minutes]:
github.com/cirruslabs/echelon.(*Logger).streamEntries(0x1400057f900, {0x103d46390, 0x140006fb470})
    /go/pkg/mod/github.com/cirruslabs/echelon@v1.9.0/logger.go:74 +0x40
created by github.com/cirruslabs/echelon.NewLogger in goroutine 1
    /go/pkg/mod/github.com/cirruslabs/echelon@v1.9.0/logger.go:52 +0xe4