mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
Able to change logger's prefix and output after configuration
This commit is contained in:
parent
c2144a83c6
commit
5e7975d97f
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
|
// SERVE IRIS BEHIND AN EXTERNAL CUSTOM fasthttp.Server, CAN BE CALLED ONCE PER IRIS INSTANCE FOR YOUR SAFETY
|
||||||
func (s *Framework) Build() {
|
func (s *Framework) Build() {
|
||||||
s.once.Do(func() {
|
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:
|
// 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)
|
serializer.RegisterDefaults(s.serializers)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user