From 5e7975d97ffd563ee86ba6c731b13c35d55c964c Mon Sep 17 00:00:00 2001 From: Gerasimos Maropoulos Date: Fri, 30 Sep 2016 14:02:03 +0300 Subject: [PATCH] Able to change logger's prefix and output after configuration --- iris.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iris.go b/iris.go index 66e7e6b0..43a75b28 100644 --- a/iris.go +++ b/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)