Update logs to reudce verbosity and consistency

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit is contained in:
Vivek Singh 2020-01-24 16:39:09 +05:30 committed by Alex Ellis
parent 6c1784e7dc
commit 9fd8a59b89
4 changed files with 5 additions and 5 deletions

View File

@ -85,5 +85,5 @@ type LoggingNotifier struct {
// Notify a log about a request
func (LoggingNotifier) Notify(method string, URL string, originalURL string, statusCode int, duration time.Duration) {
log.Printf("Forwarded [%s] to %s - [%d] - %f seconds", method, originalURL, statusCode, duration.Seconds())
log.Printf("Forwarded [%s] to %s - [%d] - %fs", method, originalURL, statusCode, duration.Seconds())
}

View File

@ -57,6 +57,6 @@ func MakeScalingHandler(next http.HandlerFunc, config scaling.ScalingConfig, def
return
}
log.Printf("[Scale] function=%s.%s 0=>N timed-out after %f seconds\n", functionName, namespace, res.Duration.Seconds())
log.Printf("[Scale] function=%s.%s 0=>N timed-out after %fs\n", functionName, namespace, res.Duration.Seconds())
}
}

View File

@ -117,7 +117,7 @@ func (f *FunctionScaler) Scale(functionName, namespace string) FunctionScaleResu
if queryResponse.AvailableReplicas > 0 {
log.Printf("[Scale] function=%s 0 => %d successful - %f seconds",
log.Printf("[Scale] function=%s 0 => %d successful - %fs",
functionName, queryResponse.AvailableReplicas, totalTime.Seconds())
return FunctionScaleResult{

View File

@ -215,9 +215,9 @@ func pipeRequest(config *WatchdogConfig, w http.ResponseWriter, r *http.Request,
}
if len(bytesWritten) > 0 {
log.Printf("%s - Duration: %f seconds", bytesWritten, execDuration)
log.Printf("%s - Duration: %fs", bytesWritten, execDuration)
} else {
log.Printf("Duration: %f seconds", execDuration)
log.Printf("Duration: %fs", execDuration)
}
}