# Send Tomcat messages to catalina.out when using systemd
$template TomcatFormat,"[%timegenerated:::date-year%-%timegenerated:::date-month%-%timegenerated:::date-day% %timegenerated:::date-hour%:%timegenerated:::date-minute%:%timegenerated:::date-second%] [%syslogseverity-text%]%msg%\n"

:programname, startswith, "tomcat10" {
  action(type="omfile" file="/var/log/tomcat10/catalina.out" Template="TomcatFormat" fileOwner="tomcat" fileCreateMode="0640")
  stop
}
