syslog question

AIX 4.3.3

I'm attempting to script a log viewer to pull out significant events from a system log and I am having some trouble with priority codes. A section in the man page on syslogd states about the log output format:

Each message is one line. A message can contain a priority code, marked by a digit enclosed in < > (angle braces) at the beginning of the line. Messages longer than 900 bytes may be truncated.

In my /etc/syslog.conf, I have:
local6.info /foo/sshell.log

I've attempted to create some test log messages with:
logger -p local6.emerg this is only a test

Which produces this in /foo/sshell.log:
Apr 30 16:12:13 zcynsm2 root: this is only a test

The output does not show the priority code (emerg, or 0, in this case). How do I get the priority code to be listed in the log as well so I can get my log viewer to differentiate message priority?
I'm expecting the priority to be displayed as stated above in the man pages.

Thanks!!

That seems like odd behavior. I've not been able to duplicate the behavior yet on my AIX system. Have you tried running syslog in debug mode (-d). It will output any errors etc. to stdout.

Thanks,

Keith

Running syslog in debug mode produces the following to stdout:

# logger -p local6.emerg this is a test

got a message (1, 0x10)
logmsg: pri 260, flags 0, from nemo, msg May 3 12:12:25 cpdlc: this is another test
Logging to FILE /foo/sshell.log
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
Logging to UNUSED
readfds = 0x30

Why does the priority show up as "260" in the debugging msg? What does all the "Logging to UNUSED" mean?

Thanks!!

jalburger,

Are you using tabs or spaces as seperators in you syslog.conf file? You should be using tabs. If you could, attach a copy of your syslog.conf as syslog.conf.txt. Don't just copy and paste it, I'd like to be able to see the actual file.

Thanks much,

Keith

yep...I'm using tabs in my conf file...

The conf file is attached.

hi.
I have the same problem as you. my question is did you find the way to have the priority of the message?

Thanks beforehand.
Tigran.