mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
update golog dependency
Former-commit-id: 304d3a25f41a2cf4f8f59964ce454d66be8b06c7
This commit is contained in:
parent
2c39828fe2
commit
caa2545e3b
4
go.mod
4
go.mod
|
@ -20,9 +20,9 @@ require (
|
||||||
github.com/iris-contrib/pongo2 v0.0.1
|
github.com/iris-contrib/pongo2 v0.0.1
|
||||||
github.com/iris-contrib/schema v0.0.1
|
github.com/iris-contrib/schema v0.0.1
|
||||||
github.com/json-iterator/go v1.1.9
|
github.com/json-iterator/go v1.1.9
|
||||||
github.com/kataras/golog v0.0.17
|
github.com/kataras/golog v0.0.18
|
||||||
github.com/kataras/neffos v0.0.16
|
github.com/kataras/neffos v0.0.16
|
||||||
github.com/kataras/pio v0.0.7
|
github.com/kataras/pio v0.0.8
|
||||||
github.com/kataras/sitemap v0.0.5
|
github.com/kataras/sitemap v0.0.5
|
||||||
github.com/klauspost/compress v1.10.6
|
github.com/klauspost/compress v1.10.6
|
||||||
github.com/mediocregopher/radix/v3 v3.5.1
|
github.com/mediocregopher/radix/v3 v3.5.1
|
||||||
|
|
5
iris.go
5
iris.go
|
@ -748,6 +748,9 @@ var RegisterOnInterrupt = host.RegisterOnInterrupt
|
||||||
// Shutdown gracefully terminates all the application's server hosts and any tunnels.
|
// Shutdown gracefully terminates all the application's server hosts and any tunnels.
|
||||||
// Returns an error on the first failure, otherwise nil.
|
// Returns an error on the first failure, otherwise nil.
|
||||||
func (app *Application) Shutdown(ctx stdContext.Context) error {
|
func (app *Application) Shutdown(ctx stdContext.Context) error {
|
||||||
|
app.mu.Lock()
|
||||||
|
defer app.mu.Unlock()
|
||||||
|
|
||||||
for i, su := range app.Hosts {
|
for i, su := range app.Hosts {
|
||||||
app.logger.Debugf("Host[%d]: Shutdown now", i)
|
app.logger.Debugf("Host[%d]: Shutdown now", i)
|
||||||
if err := su.Shutdown(ctx); err != nil {
|
if err := su.Shutdown(ctx); err != nil {
|
||||||
|
@ -1239,7 +1242,7 @@ func (app *Application) tryStartTunneling() {
|
||||||
app.config.vhost = publicAddr[strings.Index(publicAddr, "://")+3:]
|
app.config.vhost = publicAddr[strings.Index(publicAddr, "://")+3:]
|
||||||
|
|
||||||
directLog := []byte(fmt.Sprintf("• Public Address: %s\n", publicAddr))
|
directLog := []byte(fmt.Sprintf("• Public Address: %s\n", publicAddr))
|
||||||
app.Logger().Printer.Output.Write(directLog)
|
app.Logger().Printer.Write(directLog)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -112,7 +112,7 @@ func (l *requestLoggerMiddleware) ServeHTTP(ctx context.Context) {
|
||||||
if l.config.Columns {
|
if l.config.Columns {
|
||||||
endTimeFormatted := endTime.Format("2006/01/02 - 15:04:05")
|
endTimeFormatted := endTime.Format("2006/01/02 - 15:04:05")
|
||||||
output := Columnize(endTimeFormatted, latency, status, ip, method, path, message, headerMessage)
|
output := Columnize(endTimeFormatted, latency, status, ip, method, path, message, headerMessage)
|
||||||
_, _ = ctx.Application().Logger().Printer.Output.Write([]byte(output))
|
_, _ = ctx.Application().Logger().Printer.Write([]byte(output))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// no new line, the framework's logger is responsible how to render each log.
|
// no new line, the framework's logger is responsible how to render each log.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user