#!/bin/bash
# usage: . log-a
#        . log-a <logfile>

export log=${1:-`basename "$0"`.log}
exec > >(tee -i -a "$log") 2> >(tee -i -a "$log" >&2)
