I am logging messages like this in perl -
syslog ("LOG_INFO", "this is info");
syslog ("LOG_WARNING", "this is warning");
when I see these messages, I get this-
Nov 15 20:20:47 ubuntu tag-0.0.2[13399]: this is info
Nov 15 20:20:47 ubuntu tag-0.0.2[13399]: this is warning
The word "ubuntu" in syslog message happens to be host name of the local host.
Is there a way I can log locally and but specify a hostname?
My app processes data from other hosts and logs information about them. It will be great if I can specify the host name when I log messages, this way I can use third party tools easily as they can easily filter out logs based upon hostname.
btw, if I can add additional question- why are the logs not showing level of message? shouldn't I expect to see "info" in info syslog message I am logging ?