In a support thread titled ‘Saving results of app rebuild command,’ Jonathan5 asks whether output from the app rebuild command (which includes warnings) is logged anywhere, and if not, how to capture it. He mentions increasing Putty’s scrollback buffer as a temporary fix. neounix suggests using the tee command to simultaneously display and save terminal output, especially useful for shell scripts like launcher, which don’t log to Rails’ production.log. Ghan recommends checking ./launcher logs app and the /var/discourse/shared/standalone/log/rails/production.log file, though neounix clarifies that production.log only captures Rails-related output, not launcher script logs. merefield suggests switching from Putty to Microsoft’s Windows Terminal for better scrollback performance and praises tee as a useful tool. Jonathan5 acknowledges the advice, notes he’s used >>logfile 2>&1 in other contexts, but prefers to stick to documented Discourse commands for now — he’ll try increasing Putty’s scrollback, explore Windows Terminal, and check the logs.
Try ./launcher logs app
Some of the output should be there, but I’m not sure if all of it is saved. You can also find more logs under /var/discourse/shared/standalone/log/rails/ particularly the production.log file.
Because launcher is a shell script and not a Rails application, production.log under the rails directory in the log file logs only Rails info, not shell script info from launcher. It logs all Rails actions, mostly all after the Rails app (Discourse) is running.
The './launcher logs` routine is an alias for $docker_path logs $config which is the docker log.
Hence, to get all the information from all launcher processes from the launcher script, it will be necessary to tee (or use another method) the output to save the output to a file if you want to view the information in the terminal and not redirect the output to a file (redirect STDOUT). If you redirect the output to the file, you will not be able to see the output in the terminal.
This is why the tee command was created, for this purpose
So, if you want to capture the full output of the launcher script, I recommend you use tee. It works well for this type of thing.
… it’s extremely good! It’s GPU accelerated and scrolling back should not be an issue.
@neounix great tip, I’ve never used that command before! Will add that one to the arsenal. I’ve always just piped, but that gives you best of both worlds.