Not sure if this answers your question, but I believe that most things that log to /var/log/messages do so via the syslog utility.
If I understood you right, you tried searching for the text being logged in the source code for one of the daemons and couldn't find it? This could be partly due to it being programmed with internationalization in mind. The actual text may not be hard coded, but may instead be retrieved from some language file.
|