Hello right... org.ops4j.pax.logging.spi.support.DefaultServiceLog#setLogLevel() is called in pax-logging-api activator. it defaults to "0" which means TRACE. I should've rather initialized it simply to org.ops4j.pax.logging.spi.support.BackendSupport#defaultLogLevel() which checks system property.
Please create PAXLOGGING jira issue and I can fix it in pax-logging 1.11.3. regards Grzegorz Grzybek pt., 4 paź 2019 o 17:13 Jérémie Brébec <[email protected]> napisał(a): > Yes, however this property is only read in the pax-logging-api Activator > (line 64) : If a bundle starts before the pax-logging-api, then the applied > threshold will be "debug". > > > Le vendredi 4 octobre 2019 16:44:01 UTC+2, Grzegorz Grzybek a écrit : >> >> Hello Jérémie >> >> Karaf "official" distro simply has this in etc/system.properties: >> >> # Log level when the pax-logging service is not available >> # This level will only be used while the pax-logging service bundle >> # is not fully available. >> # To change log levels, please refer to the org.ops4j.pax.logging.cfg file >> # instead. >> org.ops4j.pax.logging.DefaultServiceLog.level = ERROR >> >> without it, Karaf would start with this message as well. >> >> And yes - pax-logging 1.11.x has lots of changes, adjustments and >> polishing related also to "default" logger which I wanted to be operational >> ASAP - even before pax-logging-api bundles gets ACTIVE. >> >> See new configuration page: >> https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499351646/Documentation >> >> Details about "backendless" scenario is here: >> https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499580944/Using+Pax+Logging+API+without+backend >> >> Log4j2 backend configuration: >> https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499613746/Configuring+Log4J2 >> >> A bit of background: >> https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499384369/Concepts >> >> regards >> Grzegorz Grzybek >> >> pt., 4 paź 2019 o 16:20 Jérémie Brébec <[email protected]> napisał(a): >> >>> Hello, >>> >>> I am upgrading to Karaf 4.2.7 with Pax Logging 1.11 >>> >>> Everytime Karaf is started, I see this line in the console : >>> >>> org.ops4j.pax.url.wrap [org.ops4j.pax.url.commons.handler.HandlerActivator] >>> DEBUG : Handler for protocols [wrap] started >>> >>> >>> I use a custom distribution with the static framework : the >>> startup.properties file is generated, and the start-level of pax.url.wrap >>> is lower than the start level of pax-logging-api >>> As it starts before the pax-logging-api, it gets a "fallback logger" >>> which log with System.out.println() >>> >>> 1/ I can't change the threshold of this logger, because the property >>> "org.ops4j.pax.logging.DefaultServiceLog.level" is read only when the >>> pax-loggin-api is started >>> 2/ I can't use a "FileServiceLogger" as a fallback because the >>> pax-url-wrap bundle is not starting (the logger is loaded in the activator >>> class, before the activator is called) >>> 3/ I can use a BufferingLog. However, this function doesn't seem to be >>> fully implemented : the queue in this logger is never flushed/cleared. >>> >>> Is there a solution to my problem without patching the >>> startup.properties or the karaf features ? >>> >>> Regards, >>> Jérémie >>> >>> -- >>> -- >>> ------------------ >>> OPS4J - http://www.ops4j.org - [email protected] >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "OPS4J" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ops4j/3aa380f4-a831-4106-912e-f747bf29ef79%40googlegroups.com >>> <https://groups.google.com/d/msgid/ops4j/3aa380f4-a831-4106-912e-f747bf29ef79%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > -- > ------------------ > OPS4J - http://www.ops4j.org - [email protected] > > --- > You received this message because you are subscribed to the Google Groups > "OPS4J" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ops4j/5625e728-4ab0-4596-9e08-77f5ecaf0eaa%40googlegroups.com > <https://groups.google.com/d/msgid/ops4j/5625e728-4ab0-4596-9e08-77f5ecaf0eaa%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- ------------------ OPS4J - http://www.ops4j.org - [email protected] --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAAdXmhpE37VTTrWKXU3zHRfmEzbWwo8%3DvpnUimvzoRRW0x6K2w%40mail.gmail.com.
