#!/bin/sh -e
#
# tlog - prefix given lines with timestamp - useful to pipe to from daemons

while read -r line ; do
  if [ -n "${line}" ] ; then
    # shellcheck disable=SC2312
    printf '[%s] %s\n' "$(date +"%Y-%m-%d %H:%M:%S")" "${line}"
  fi
done
