mirror of
https://github.com/openfaas/faas.git
synced 2025-06-09 08:46:48 +00:00
Update logs to reudce verbosity and consistency
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
This commit is contained in:
parent
6c1784e7dc
commit
9fd8a59b89
@ -85,5 +85,5 @@ type LoggingNotifier struct {
|
|||||||
|
|
||||||
// Notify a log about a request
|
// Notify a log about a request
|
||||||
func (LoggingNotifier) Notify(method string, URL string, originalURL string, statusCode int, duration time.Duration) {
|
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())
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,6 @@ func MakeScalingHandler(next http.HandlerFunc, config scaling.ScalingConfig, def
|
|||||||
return
|
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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ func (f *FunctionScaler) Scale(functionName, namespace string) FunctionScaleResu
|
|||||||
|
|
||||||
if queryResponse.AvailableReplicas > 0 {
|
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())
|
functionName, queryResponse.AvailableReplicas, totalTime.Seconds())
|
||||||
|
|
||||||
return FunctionScaleResult{
|
return FunctionScaleResult{
|
||||||
|
@ -215,9 +215,9 @@ func pipeRequest(config *WatchdogConfig, w http.ResponseWriter, r *http.Request,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(bytesWritten) > 0 {
|
if len(bytesWritten) > 0 {
|
||||||
log.Printf("%s - Duration: %f seconds", bytesWritten, execDuration)
|
log.Printf("%s - Duration: %fs", bytesWritten, execDuration)
|
||||||
} else {
|
} else {
|
||||||
log.Printf("Duration: %f seconds", execDuration)
|
log.Printf("Duration: %fs", execDuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user