mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
Able to change logger's prefix and output after configuration
This commit is contained in:
4
iris.go
4
iris.go
@@ -293,6 +293,10 @@ func Build() {
|
||||
// SERVE IRIS BEHIND AN EXTERNAL CUSTOM fasthttp.Server, CAN BE CALLED ONCE PER IRIS INSTANCE FOR YOUR SAFETY
|
||||
func (s *Framework) Build() {
|
||||
s.once.Do(func() {
|
||||
// re-nwe logger's attrs
|
||||
s.Logger.SetPrefix(s.Config.LoggerPreffix)
|
||||
s.Logger.SetOutput(s.Config.LoggerOut)
|
||||
|
||||
// prepare the serializers, if not any other serializers setted for the default serializer types(json,jsonp,xml,markdown,text,data) then the defaults are setted:
|
||||
serializer.RegisterDefaults(s.serializers)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user