0

Every time Felix starts a bundle, I get logging output on the lines of:

BundleEvent STARTED
BundleEvent RESOLVED
ServiceEvent REGISTERED

The log level is debug, and it doesn't come from any felix class, but from my own classes, so I have no way to filter it and still see debug messages from my own code.

How do you reduce Felix' log level? I've tried the obvious, felix.log.level to no avail (plus it defaults to error). Any ideas? Thanks!

Update: Here's the stack trace that leads to this:

Thread [FelixDispatchQueue] (Suspended (entry into method log in PaxLoggingServiceImpl))    
    PaxLoggingServiceImpl.log(Bundle, ServiceReference, int, String, Throwable) line: 121   
    PaxLoggingServiceImpl.log(Bundle, int, String, Throwable) line: 115 
    FrameworkHandler.bundleChanged(BundleEvent) line: 93    
    EventDispatcher.invokeBundleListenerCallback(Bundle, EventListener, EventObject) line: 868  
    EventDispatcher.fireEventImmediately(EventDispatcher, int, Map, EventObject, Dictionary) line: 789  
    EventDispatcher.run() line: 1088    
    EventDispatcher.access$000() line: 54   
    EventDispatcher$1.run() line: 101   
    Thread.run() line: 662  
Cœur
  • 37,241
  • 25
  • 195
  • 267
Miquel
  • 15,405
  • 8
  • 54
  • 87
  • You said the messages come from your own code... so why not just remove the lines that output the messages? What am I missing? – Neil Bartlett May 03 '13 at 08:57
  • Sorry, I didn't explain that right. The category of the log message is one of my bundles (at least its Bundle Symbolic Name), the class name of the caller issuing the request is unknown (I get a question mark on the output). My root logger is set to warning and the logger for things in my code's packages is set to Debug. But I certainly do not output the messages. It's done by Felix when it starts the bundle instead. – Miquel May 03 '13 at 09:04
  • How can you be sure it's Felix outputting these messages? I've never seen it do that. More likely it's some other bundle containing a ServiceListener and BundleListener. – Neil Bartlett May 03 '13 at 09:11
  • You are right. This is actually generated by PAX-Logging – Miquel May 03 '13 at 09:31

1 Answers1

1

Just copying your solution text here, so that the question can be marked as answered.

This is generated by PAX-Logging and not felix! It is controlled by the system property (change with e.g. -Dorg.ops4j.pax.logging.service.frameworkEventsLogLevel="INFO"). You cannot set it to anything lower than DEBUG, though. The relevant class, in case you want to change it is org.ops4j.pax.logging.service.internal.FrameworkHandler

Neil Bartlett
  • 23,743
  • 4
  • 44
  • 77
  • Great, thanks for that. I've also filed an ["improvement request" here](https://ops4j1.jira.com/browse/PAXLOGGING-157) – Miquel May 03 '13 at 11:01