File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ type AppEvent interface {
4545
4646// App Ioc App
4747type App struct {
48- logger * Logger
4948 container * container
5049 exitChan chan struct {}
5150}
@@ -88,14 +87,14 @@ func (app *App) run(resourceLocator ResourceLocator) error {
8887 return err
8988 }
9089
91- app . logger = GetLogger ("" , utils .TypeName (app ))
90+ var logger = GetLogger ("" , utils .TypeName (app ))
9291
9392 app .onAppRun (app .container )
9493
9594 app .onAppStart (app .container )
9695
9796 app .container .clear ()
98- app . logger .Info ("application started successfully" )
97+ logger .Info ("application started successfully" )
9998
10099 // Responding to the Ctrl+C and kill commands in the console.
101100 go func () {
@@ -111,7 +110,7 @@ func (app *App) run(resourceLocator ResourceLocator) error {
111110
112111 app .container .Close ()
113112
114- app . logger .Info ("application exited" )
113+ logger .Info ("application exited" )
115114
116115 return nil
117116}
@@ -186,7 +185,8 @@ func (app *App) Shutdown(msg ...string) {
186185 case <- app .exitChan :
187186 // app already closed
188187 default :
189- app .logger .Info (fmt .Sprintf ("program will exit %s" , strings .Join (msg , ", " )))
188+ var logger = GetLogger ("" , utils .TypeName (app ))
189+ logger .Info (fmt .Sprintf ("program will exit %s" , strings .Join (msg , ", " )))
190190 close (app .exitChan )
191191 }
192192}
You can’t perform that action at this time.
0 commit comments