The 'log' utility

This utility redirects a program's output into a uniquely named log file. Usage:

log [options] <log-file-base-name> <command>


  • -t: Add timestamp before each line in the log file
  • -s: Add start timestamp at top of log file
  • -f: Add finish timestamp at end of log file
  • -c: Add command being executed at top of log file
  • -x: Add child process exit code at end of log file

Example. The command:

log "c:\Log Files\dir" cmd /c dir

executes 'cmd /c dir' and redirects its output into a file name like:

  • c:\Log Files\dir-20170727-195214223-SUCCESS.log

    (when exit code is 0)

  • c:\Log Files\dir-20170727-195214223-ERROR-<n>.log

    (when exit code is <n>)


  • Size:  29KB
  • License:  free
  • Download:  'log' is part of Bitvise SSH Client, which is available free of charge for use in all environments. The utility can also be downloaded here.