fix logger

This commit is contained in:
2020-09-25 00:45:45 +03:00
parent d2b22f4760
commit 9f3eaafa3f
21 changed files with 115 additions and 79 deletions

View File

@ -15,7 +15,7 @@ type MainWindow struct {
}
func Init(ctx context.Context) *MainWindow {
appctx.Logger(ctx).Info().Msgf("Opening main window...")
appctx.Logger().Info().Msgf("Opening main window...")
mw := MainWindow{ctx: ctx, layers: make(map[string]types.Renderable, 0)}
mw.Open()
return &mw
@ -33,7 +33,7 @@ func (mw *MainWindow) GetLayer(name string) *Layer {
if layer, ok := mw.layers[name]; ok {
return layer.(*Layer)
}
appctx.Logger(mw.ctx).Fatal().Msgf("No layer with such name %s", name)
appctx.Logger().Fatal().Msgf("No layer with such name %s", name)
return nil
}
@ -58,7 +58,7 @@ func (mw *MainWindow) Open() {
}
func (mw *MainWindow) Close() {
appctx.Logger(mw.ctx).Info().Msg("Closing main window...")
appctx.Logger().Info().Msg("Closing main window...")
blt.Close()
}