Keep live TUI logs off the console

This commit is contained in:
Mikhail Chusavitin
2026-03-14 14:51:25 +03:00
parent 6082c7953e
commit f1e096cabe
2 changed files with 6 additions and 2 deletions

View File

@@ -116,6 +116,10 @@ func runTUI(args []string, stdout, stderr io.Writer) int {
return 1
}
slog.SetDefault(slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{
Level: slog.LevelInfo,
})))
application := app.New(platform.New())
if err := tui.Run(application, runtimeInfo.Mode); err != nil {
slog.Error("run tui", "err", err)

View File

@@ -1,7 +1,7 @@
#!/bin/sh
if [ "$(id -u)" -ne 0 ]; then
exec sudo -n /usr/local/bin/bee tui --runtime livecd "$@"
exec sudo -n /usr/local/bin/bee tui --runtime livecd "$@" 2>>/var/log/bee-tui.log
fi
exec /usr/local/bin/bee tui --runtime livecd "$@"
exec /usr/local/bin/bee tui --runtime livecd "$@" 2>>/var/log/bee-tui.log