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

add LogLevel/WithLogLevel in Configuration and run Configurators before Build state

Former-commit-id: d38f1fdae98d650692775f4cee06bd017aba959f
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-05-08 03:55:54 +03:00
parent 6a6117eb4f
commit 116503a9a5
6 changed files with 64 additions and 24 deletions

View File

@@ -1,8 +1,6 @@
package context
import (
"github.com/kataras/iris/v12/core/netutil"
)
import "github.com/kataras/iris/v12/core/netutil"
// ConfigurationReadOnly can be implemented
// by Configuration, it's being used inside the Context.
@@ -17,6 +15,10 @@ type ConfigurationReadOnly interface {
// If original addr was 0.0.0.0, it will return localhost.
GetVHost() string
// GetLogLevel returns the `Configuration.LogLevel` field.
// The same (as `golog.LogLevel`) can be retrieved through `app.Logger().Level`.
GetLogLevel() string
// GetDisablePathCorrection returns the configuration.DisablePathCorrection,
// DisablePathCorrection corrects and redirects the requested path to the registered path
// for example, if /home/ path is requested but no handler for this Route found,