Where are SNAP gpt (from CLI) logfiles?

Hi SNAP, when running SNAP gpt from the command line, where I can find the log files reporting the same info that I can see on the SNAP console? The files in User/AppData/Roaming/SNAP/var/log do not show the required information (probably just the logging of the Desktop app?). For each run of SNAP at the command line, I would like to read the results on a log file. Is it possible?
Thanks a lot,

The output is only logged to the console by default.
If you want to have the output in a file, you can redirect it by
gpt ... > file.txt 2>&1
This redirects the standard and the error output. Or you can split it into separate files by
gpt > stdlog.txt 2> errorlog.txt

1 Like

Thank you very much, redirection is clearly the best solution.

Just one thing to add, after trying: by launching the command as you suggest you likely get an error message “Access is denied” if the user is not allowed to write on the snap folder. Just solved by adding a full path to a folder with writing permission: e.g. "gpt … > path\to\dir\stdlog.txt 2> path\to\dir\errlog.txt

Thank you very much again.

Yes, true. This can be an issue when using the bin folder where gpt is located as working directory. In this case, your suggestion is the solution.
But you can have the bin folder on the path. In this case you can invoke gpt from everywhere and you don’t need to add the full path. The installation programme makes this configuration by default