I am using AWS Elasticbeanstalk to run my java web application. In EC2 node under /etc/rsyslog.d/web.conf
if $programname == 'web' then {
*.=warning;*.=err;*.=crit;*.=alert;*.=emerg /var/log/web.stderr.log
*.=info;*.=notice /var/log/web.stdout.log
}
I get what is being done.
but I did not get where the $programname is set as web. if i want to create my own programname and redirect logs to different file, how to do it?
openlog().