Hi, we run Lucee servers with 5 static web contexts on each one. The 5 sites share some cfc components and also have code that isn’t shared but is similar. For example in these sites there are lots of lines like:
<cflog file="mailrecord" application="true" text="Emailed bob@mail.com his report"/>
The problem we are seeing is that Lucee is appending this data to the log file under the wrong web context. So for example in the file WEB-INF/site_one/logs/mailrecord.log we have lines like:
“INFO”,“Thread-250”,“03/21/2023”,“11:19:53”,“site_one”,“Emailed bob@mail.com his report”
“INFO”,“Thread-250”,“03/21/2023”,“11:43:13”,“site_one”,“Emailed jen@mail.com about new data”
Nothing wrong with those. But we also have lines like:
“INFO”,“Thread-250”,“03/21/2023”,“12:21:01”,“site_two”,“Emailed someone about something”
In my tests, requests on site_one were logged correctly until I visited site_two, then requests for both site_one and site_two went into the log file for site_two. I tried this test on 5.3.10.120, the version 6 beta, and a couple of older versions on the 5.3 release (the oldest I tried was 5.3.6.61). They all exhibited this problem.
I know cflog file="filename"
is deprecated, but we have a ton of legacy code that uses it. During this test I also tried using cflog log="logname_from_administrator"
, but I could never get any log lines to show up in the files. The “logname_from_administrator.log” file was created for each site, but they only contained the header, never any data. The log level in the administrator for logname_from_administrator was set to INFO.
This issue might be similar or the same to the one we reported a few months ago, which did get marked as fixed:
https://lucee.daemonite.io/t/lucee-is-sometimes-logging-to-the-wrong-site/11364
https://luceeserver.atlassian.net/browse/LDEV-4263
Thanks for any help.
OS : Windows 2019
Java Version : 11.0.18
Tomcat Version : 9.0.71
Lucee Version : 5.3.10.120