mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 10:36:45 +01:00
restore log on ui teardown (#3427)
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
parent
3c070e0ad9
commit
b0bffef1a2
@ -78,6 +78,13 @@ func (m *UI) Handle(e partybus.Event) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *UI) Teardown(force bool) 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(m.err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
if !force {
|
if !force {
|
||||||
m.handler.Wait()
|
m.handler.Wait()
|
||||||
m.program.Quit()
|
m.program.Quit()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user