pelotech / drone-helm3

Plugin for drone to deploy helm charts using helm3
Apache License 2.0
31 stars 36 forks source link

Replace fmt.Printf with an actual logger #14

Closed ErinCall closed 4 years ago

ErinCall commented 4 years ago

Currently, all logging is done with fmt.Printf (or .Println, .Fprintf, etc.). That's fine for a first pass, but we should really use the log package or something like it. Printf output can pollute the test output, and it would be great to be able to say logger.Debug("...") instead of

if cfg.Debug {
    fmt.Fprint(cfg.Stderr, "...\n")
}
ErinCall commented 4 years ago

Closing this as wontfix—I had succumbed to the temptation to overdesign.

I made some progress using Logrus, but hooking up commands' stdout/stderr to the logger turns out to be surprisingly complex. I don't think the effort is worth the trouble.