BEGIN{
printf("%-5.5s %-10.10s %-8.8s %s\n","Time","Host","Agent","Details")
}
/error/||/warning/{
split($1,dtime,":")
split($3,agent,"=")
msg[2]=""
if (match($0,"-m")) {
        qmsg=substr($0,RSTART+3)
        split(qmsg,msg,"'")
        }
host[1]=myhost
if (match($0,"-h")) {
        split(substr($0,RSTART+3),host," ")
        }

printf("%-5.5s %-10.10s %-8.8s %s\n",dtime[2],host[1],agent[2],msg[2]);
}
