mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 10:27:06 +00:00
Update to 4.1.7. Logger changes, read HISTORY.md
This commit is contained in:
@@ -568,7 +568,9 @@ func (ctx *Context) Render(name string, binding interface{}, options ...map[stri
|
||||
func (ctx *Context) MustRender(name string, binding interface{}, options ...map[string]interface{}) {
|
||||
if err := ctx.Render(name, binding, options...); err != nil {
|
||||
ctx.Panic()
|
||||
ctx.framework.Logger.Dangerf("MustRender panics for client with IP: %s On template: %s.Trace: %s\n", ctx.RemoteAddr(), name, err)
|
||||
if ctx.framework.Config.IsDevelopment {
|
||||
ctx.framework.Logger.Printf("MustRender panics for client with IP: %s On template: %s.Trace: %s\n", ctx.RemoteAddr(), name, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -978,3 +980,8 @@ func (ctx *Context) SessionDestroy() {
|
||||
func (ctx *Context) Log(format string, a ...interface{}) {
|
||||
ctx.framework.Logger.Printf(format, a...)
|
||||
}
|
||||
|
||||
// Framework returns the Iris instance, containing the configuration and all other fields
|
||||
func (ctx *Context) Framework() *Framework {
|
||||
return ctx.framework
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user