Is there a way to read from present tty?
In practice: I boot into tty and manually start the graphical session (Wayland/Sway). I occasionally get (non-Sway) warnings when I return to tty (eg close the window manager). But the output is always scuffed, so I can't read the whole log. The lines get printed on top of each other or something.
Is there a way to read everything from tty, from within the tty?
Neither of the methods below work, because the warnings/errors aren't produced by Sway itself, but some other OS module/component.
$ sway |& tee /tmp/sway.log
$ tail -f /tmp/sway.log
It might be useful to try and figure out what's logging the messages.
However, if it was me, I'd strongly consider just starting from your shell in the tty, then running tmux, then starting sway, then attaching to tmux from a terminal emulator.
If things are printed on top of each other, try script?
https://man.freebsd.org/cgi/man.cgi?query=script&apropos=0&s...
But, if you're getting console debugs from the kernel, that wouldn't be captured either... Otoh, debug output from the kernel should also go into logs or dmesg or something?
You'll capture everything and maybe be able to figure it out from there?