1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00

add IsDebug() shortcut method

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-10 16:20:19 +03:00
parent ae67987f55
commit b17217444e
5 changed files with 22 additions and 2 deletions

View File

@@ -276,6 +276,14 @@ func (app *Application) Logger() *golog.Logger {
return app.logger
}
// IsDebug reports whether the application is running
// under debug/development mode.
// It's just a shortcut of Logger().Level >= golog.DebugLevel.
// The same method existss as Context.IsDebug() too.
func (app *Application) IsDebug() bool {
return app.logger.Level >= golog.DebugLevel
}
// I18nReadOnly returns the i18n's read-only features.
// See `I18n` method for more.
func (app *Application) I18nReadOnly() context.I18nReadOnly {