sasjs / cli

Command line interface for creating, compiling, and building SAS® projects

Home Page:https://cli.sasjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to control log file destination

jbodart-argenx opened this issue · comments

The log file generated by sasjs run myprogram.sas is currently difficult to predict (e.g. sasjs-run-20220912073659.log).
In order to automatically display or post-process (e.g. search for specific messages such as errors and warnings) the log file it would be necessary to be able to pre-specify the log file destination.

I think this might be implemented as one or more of the following:

  • the option to specify the log filename on the command line, or (for a fixed filename overwritten by each run) in a configuration file
  • the option to copy the log to the standard output, so it can be piped into the next command
  • sasjs could set an environment variable specifying the log filename, so the next command could refer to it using that environment variable

Thanks for the feedback, indeed we should support the -l / --log option for sasjs run. We will also update the sasjs help documentation for the new option.