Add functions for structured progress logging
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package output
|
||||
|
||||
import (
|
||||
"github.com/apex/log"
|
||||
)
|
||||
|
||||
// Progress logs a progress type event
|
||||
func Progress(key string, perc float64, msg string) {
|
||||
log.WithFields(log.Fields{
|
||||
"type": "progress",
|
||||
"key": key,
|
||||
"percentage": perc,
|
||||
}).Info(msg)
|
||||
}
|
||||
Reference in New Issue
Block a user