Sha256: b1de682befaa6051df993d80cffdf17af5d074c0ab5c321d7e1e56a6499e76d2

Contents?: true

Size: 694 Bytes

Versions: 16

Compression:

Stored size: 694 Bytes

Contents

#!/usr/bin/env bash

if [[ ! -z "$2" ]] ; then level=$1 ; shift ; else level="info" ; fi
message=$1
case "$level" in
  debug) shift ; echo -e "$(tput setaf 5)<d>$(tput sgr0) $message $(tput setaf 5)</d> $(tput sgr0) "     ;;
  info)  shift ; echo -e "$(tput setaf 2)<i>$(tput sgr0) $message $(tput setaf 2)</i> $(tput sgr0) "     ;;
  warn)  shift ; echo -e "$(tput setaf 3)<w>$(tput sgr0) $message $(tput setaf 3)</w> $(tput sgr0) "     ;;
  error) shift ; echo -e "$(tput setaf 1)<e>$(tput sgr0) $message $(tput setaf 1)</e> $(tput sgr0) " >&2 ;;
  fail)  shift ; echo -e "$(tput setaf 1)<f>$(tput sgr0) $message $(tput setaf 1)</f> $(tput sgr0) " >&2 ;;
  *) echo -e "$message"
esac

exit 0

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rvm-0.0.98 scripts/log
rvm-0.0.97 scripts/log
rvm-0.0.96 scripts/log
rvm-0.0.95 scripts/log
rvm-0.0.93 scripts/log
rvm-0.0.92 scripts/log
rvm-0.0.91 scripts/log
rvm-0.0.90 scripts/log
rvm-0.0.89 scripts/log
rvm-0.0.88 scripts/log
rvm-0.0.87 scripts/log
rvm-0.0.86 scripts/log
rvm-0.0.85 scripts/log
rvm-0.0.84 scripts/log
rvm-0.0.83 scripts/log
rvm-0.0.82 scripts/log