log

Output of --help=log

The following help text is generated by ecflow_client --help=log

log
---

Get,clear,flush or create a new log file.
The user must ensure that a valid path is specified.
Specifying '--log=get' with a large number of lines from the server,
can consume a lot of **memory**. The log file can be a very large file,
hence we use a default of 100 lines, optionally the number of lines can be specified.
 arg1 = [ get | clear | flush | new | path ]
  get -   Outputs the log file to standard out.
          defaults to return the last 100 lines
          The second argument can specify how many lines to return
  clear - Clear the log file of its contents.
  flush - Flush and close the log file. (only temporary) next time
          server writes to log, it will be opened again. Hence it best
          to halt the server first
  new -   Flush and close the existing log file, and start using the
          the path defined for ECF_LOG. By changing this variable
          a new log file path can be used
          Alternatively an explicit path can also be provided
          in which case ECF_LOG is also updated
  path -  Returns the path name to the existing log file
 arg2 = [ new_path | optional last n lines ]
         if get specified can specify lines to get. Value must be convertible to an integer
         Otherwise if arg1 is 'new' then the second argument must be a path
Usage:
  --log=get                        # Write the last 100 lines of the log file to standard out
  --log=get 200                    # Write the last 200 lines of the log file to standard out
  --log=clear                      # Clear the log file. The log is now empty
  --log=flush                      # Flush and close log file, next request will re-open log file
  --log=new /path/to/new/log/file  # Close and flush log file, and create a new log file, updates ECF_LOG
  --log=new                        # Close and flush log file, and create a new log file using ECF_LOG variable


The client considers, for both user and child commands, the following environment variables:

  ECF_HOST <string> [mandatory*]
    The main server hostname; default value is 'localhost'
  ECF_PORT <int> [mandatory*]
    The main server port; default value is '3141'
  ECF_SSL <any> [optional*]
    Enable secure communication between client and server.
  ECF_HOSTFILE <string> [optional]
    File that lists alternate hosts to try, if connection to main host fails
  ECF_HOSTFILE_POLICY <string> [optional]
    The policy ('task' or 'all') to define which commands consider using alternate hosts.

The options marked with (*) must be specified in order for the client to communicate
with the server, either by setting the environment variables or by specifying the
command line options.