#!/bin/bash

logFile=${1:-$HOME/logger.log}

function doLog() { echo "`date` - $*" >> $logFile ; }

doLog "Opened logger ($logFile)"
echo "Opened log file $logFile"
while read i; do doLog $i ; done
doLog "Closed"
