function h2l { echo -n "USER $USER : PWD $PWD : CMD = $BASH_COMMAND" | grep -v -e "echo -ne "| logger -p local1.notice -i ; } |
trap h2l DEBUG |
May 27 23:19:25 localhost
logger[22571]: USER root : PWD /root : CMD = df -h May 27 23:20:36 localhost logger[22587]: USER root : PWD /root : CMD = man env May 27 23:20:56 localhost logger[22620]: USER root : PWD /root : CMD = env -i May 27 23:20:58 localhost logger[22630]: USER root : PWD /root : CMD = env |