log-script-cli

run and log script


Keywords
log, cli, shell
License
BSD-3-Clause
Install
pip install log-script-cli==0.0.0

Documentation

Travis

Install

$ [sudo] npm i -g log-script-cli
$ [sudo] pip install log-script-cli

Features

  • run and log script
  • store stdout/stderr, execution time and environment variables
  • customizable path

Usage

usage: log-script script [args ...]
usage: log-script-helper exit_with script [args ...]

How it works

~/.log/stdout/script/date-tag/pid.log           stdout/stderr
~/.log/stdout/script/date-tag/pid.log.env       environment variables
~/.log/stdout/script/date-tag/pid.log.time      execution time

path customizable with log-script-helper

Examples

$ log-script path/to/script.sh
~/.log/stdout/~/git/path/to/script.sh/2018-05-29/23-20-00/62968.log

customize log path with log-script-helper

usage: log-script-helper exit_with script [args ...]
export PATH=~/.bin:$PATH
~/.bin/log-script-helper