mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Save http trace to a file (#5300)
Save http trace to a file instead of displaying it onto the console. the environment variable MINIO_HTTP_TRACE will be a filepath instead of a boolean. This to handle the scenario where both json and http tracing are turned on. In that case, both http trace and json output are displayed on the screen making the json not parsable. Loging this trace onto a file helps us avoid that scenario. Fixes #5263
This commit is contained in:
@@ -61,6 +61,7 @@ func handleSignals() {
|
||||
|
||||
exit(err == nil && oerr == nil)
|
||||
case osSignal := <-globalOSSignalCh:
|
||||
stopHTTPTrace()
|
||||
log.Printf("Exiting on signal %v\n", osSignal)
|
||||
exit(stopProcess())
|
||||
case signal := <-globalServiceSignalCh:
|
||||
@@ -71,12 +72,14 @@ func handleSignals() {
|
||||
log.Println("Restarting on service signal")
|
||||
err := globalHTTPServer.Shutdown()
|
||||
errorIf(err, "Unable to shutdown http server")
|
||||
stopHTTPTrace()
|
||||
rerr := restartProcess()
|
||||
errorIf(rerr, "Unable to restart the server")
|
||||
|
||||
exit(err == nil && rerr == nil)
|
||||
case serviceStop:
|
||||
log.Println("Stopping on service signal")
|
||||
stopHTTPTrace()
|
||||
exit(stopProcess())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user