Log output set to commandwindow almost at start of window creation now
@@ -103,6 +103,7 @@ func NewWindow(doRestart chan bool, app *tview.Application, session *discordgo.S
}()
window.commandView = NewCommandView(window.ExecuteCommand)
+ log.SetOutput(window.commandView)
window.jsEngine.SetErrorOutput(window.commandView.commandOutput)
if err := window.jsEngine.LoadScripts(config.GetScriptDirectory()); err != nil {
@@ -824,8 +825,6 @@ func NewWindow(doRestart chan bool, app *tview.Application, session *discordgo.S
window.registerMouseFocusListeners()
- log.SetOutput(window.commandView)
-
return window, nil
}
