The 'log' utility

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

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

Options:

  • -s: Add start timestamp at top of log file
  • -c: Add command being executed at top of log file
  • -f: Add finish timestamp at end 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-20050927-195214223-SUCCESS.log

    (when exit code is 0)

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

    (when exit code is <n>)

Essentials:

  • Size:  20KB
  • License:  free
  • Download:  'log' is part of the Bitvise SSH Client (Tunnelier) package starting with version 4.06a, but it can also be downloaded from here.