Skip to content

Commit

Permalink
restore log on ui teardown
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <[email protected]>
  • Loading branch information
wagoodman committed Nov 8, 2024
1 parent 1096df1 commit c544035
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/quill/internal/ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ func (m *UI) Handle(e partybus.Event) error {
}

func (m *UI) Teardown(force bool) error {
defer func() {
// allow for traditional logging to resume now that the UI is shutting down
if logWrapper, ok := log.Get().(logger.Controller); ok {
logWrapper.SetOutput(os.Stderr)
}
}()

if !force {
m.handler.State().Running.Wait()
m.program.Quit()
Expand Down

0 comments on commit c544035

Please sign in to comment.