Application.log full of unwanted OSGI logs

I’ve checked this and can able to reproduce with the latest version 5.3.8.20-SNAPSHOT and 5.3.7.34-RC too.

  • But, you can’t see the latest versions of snapshots and RC too if you don’t create a log for application as a separate.
  • This issue will log with application.log in web-inf.
  • But, we couldn’t able to see the application.log in that folder.
  • Because the log not available in web-admin - settings/logging.
  • So, if we create an application.log and level as info means, we could see this below log as level info.

"INFO","ajp-nio-8009-exec-8","07/31/2020","16:59:13","OSGI","add bundle:test\lib\jsoup\jsoup-1.10.2.jar"

the missing application.log is another bug/regression?

bug filed [LDEV-2990] - Lucee

Yup, certainly and see https://lucee.daemonite.io/t/no-application-log-written-but-others-are/7088/17 because even if you try and fake it the contents are wrong

Just to resurrect this, the issue with no application.log at all is sorted, but that just makes it even more annoying that it’s full of OSGI spam, multiple lines on every single request.

This directly goes into increased costs for storage / transfer for sites that have any Java classes loaded.

I’ve submitted a simple one line PR because that’d be easier for everyone then hand hacking .jar files, with unknown impacts beyond not making it log as much

Does anyone know when the next release, with hopefully this fix in, might be ?

just truncate the log

set -o noclobber
tail -t 1000 > nameoflogfile /pathoflogfile/logfile

alternatively, you could setup logrotate

Hi Terry.

That’d work on a small scale, but we’ve a fleet of servers, all shipping out to places like DataDog and/or AWS CloudWatch Logs etc

These places charge for storage, and the I/O is a pain point too when lots of requests are happening.

It’s not a long term solution I feel.

I should charge for my support here… :wink:

you could easily use cfexecute to call a script task to purge the file
you could alternatively just dump the file to /dev/null
logrotate has used by enterprises worldwide, format is pretty straight forward

you could put on your java hat and do something like this

handlers = 1mybad.spring.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler        

1mybad.spring.org..apache.juli.FileHandler.level = SEVERE
1mybad.spring.org..apache.juli.FileHandler.directory = ${catalina.base}/logs
1mybad.spring.org..apache.juli.FileHandler.prefix = springframework.

java.util.logging.ConsoleHandler.level = SEVERE  
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter      

org.springframework.handlers = 1spring.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

Or you could limit the number of logging lines by changing the lucee init call

2>&1 | head -10 >> "$CATALINA_OUT" &

Or you could just try to remove all logging, and suffer

server.xml

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
           prefix="localhost_access_log." suffix=".txt"
           pattern="%h %l %u %t &quot;%r&quot; %s %b" />

then in /conf

conf/logging.properties

handlers = 1catalina.org.apache.juli.FileHandler,


Comment all that out, then point your whole application into a /dev/null for anything else.

Or, or, and hear me out here, Lucee could not have started spamming non-application INFO events to the application log file :slight_smile: - I’ve been running *nix servers for 30 years (my first job was admin on a cluster of Sparc). I know about logrotate :slight_smile:

Putting work arounds in for a (fixed) bug could easily lead to other issues, which is why we’re waiting on a Lucee release.

Well, My take, as I see many enterprise companies making a fortune on opensource products

If you’re making money on an opensource product and its not doing what you want, either contribute to the project and ask nicely for the feature, fork it and code it the way you want, or change platforms.

The application.log growing to infinity isnt unique to lucee

If its that big of an issue, then throw resources at it as there is a business case for its feature and if not, then make one.
If you cant do those, then is it really a needed “feature” or is it just a want.

The lucee forum is filled with some of the biggest leaders in the Coldfusion realm. Really not to hard to ask @carehart @pfreitag @bennadel or others for their consulting services.

1 Like

I agree !

It’s why I contributed the fix.

I just asked when the next Lucee release might be, not sure why we’ve ended up at this place.