Saving results of app rebuild command

I see some warnings when I rebuild the app but rarely get a chance to read them.

Is this text logged anywhere?

If not, is there a recommended way to do this?

I have just increased putty’s “lines of scrollback” from 2,000 to 20,000 which may be the easy answer.

1 Like

If you are building on linux and other unix-like systems you may use the tee command.

image

See Also:

4 Likes

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 :slight_smile:

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.

2 Likes

@Jonathan5 Putty? You might want to consider Microsoft’s new(ish) and free open-source Windows 10 Terminal app from the Windows store?

GitHub: GitHub - microsoft/terminal: The new Windows Terminal and the original Windows console host, all in the same place!.

… 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.

5 Likes

I’ll look into tee. I use >>logfile 2>&1 in some (non-Discourse) cron jobs.

In either case I’m reluctant to do anything different to the exact commands set out in the how-to guides here.

So for the time being I’ll increase the scroll back in putty and also look into that Microsoft alternative.

I’ll also check out the logs.

Thanks for the advice!