log-exec

exec args and log stdout and stderr

Usage no npm install needed!

<script type="module">
  import logExec from 'https://cdn.skypack.dev/log-exec';
</script>

README

exec args and log stdout and stderr

Installation

$ [sudo] npm i -g log-exec

How it works

stdout and stderr are duplicated in log files:

$LOG_EXEC/<command>/out.log
$LOG_EXEC/<command>/err.log

Config

$ export LOG_EXEC=~/Library/Logs/log-exec # /usr/local/var/log/log-exec by default

Scripts usage

command|usage -|- log-exec |usage: log-exec command [args ...]

Examples

$ log-exec script.sh

or use log-exec as interpreter:

script.sh

#!/usr/bin/env log-exec bash
...

python-readme-generator