LJ Archive

Listing 2. Generating Messages for All Facilities at Each Priority

Level

#!/bin/bash
#
# Script to generate one log message per
# priority level per facility
#
for i in {auth,authpriv,cron,daemon,kern,lpr,mail,
mark,news,syslog,user,uucp,local0,local1,local2,
local3,local4,local5,local6,local7}

do
  for k in {debug,info,notice,warning,err,crit,
            alert,emerg}
  do
    logger -p $i.$k "Test message, facility $i
                     priority $k"
  done
done
LJ Archive