This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#log all your bash command to syslog | |
function log2syslog | |
{ | |
declare COMMAND | |
COMMAND=$(fc -ln -0) | |
logger -p local1.notice -t bash -i -- "${USER}:${COMMAND}" | |
} | |
trap log2syslog DEBUG | |
#moredetails can be found here |