[
https://issues.apache.org/jira/browse/FELIX-6293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161412#comment-17161412
]
Tom Watson commented on FELIX-6293:
-----------------------------------
I admit that I don't understand why the ComponentLogger has a parent of
BundleLogger. The bundle logger is supposed to use the ROOT_LOGGER_NAME but
there was a bug in the latest refactoring I did with logging (See FELIX-6307).
The OSGi Logger for the ComponentLogger will already be enabled according to
the ROOT_LOGGER_NAME of the component bundle (BundleLogger) if the component
logger name has not been configured directly with LoggerAdmin. I suppose it is
possible the ROOT_LOGGER_NAME for the bundle could have a higher log level
enabled, but it seems like the component logger should be able to override that
but the current implementation does not allow that.
It seems ComponentLogger should skip over trying log to its BundleLogger and
instead just go to the SCRLogger, but why even do that? I think the whole
parent concept here is way over complicated. If we went with logger names that
had a common ancestry like I suggested before then I think logger admin could
be used to enable any combination you want without all this complicated parent
stuff.
> Apache Felix SCR Logging
> ------------------------
>
> Key: FELIX-6293
> URL: https://issues.apache.org/jira/browse/FELIX-6293
> Project: Felix
> Issue Type: Improvement
> Components: Declarative Services (SCR)
> Reporter: Peter Kriens
> Priority: Minor
> Attachments: image-2020-07-20-15-22-24-373.png
>
>
> Apache Felix SCR uses the component's logger name to find the level to log
> at. If the component happens to be on DEBUG, this then floods the log and
> makes it hard to debug the component.
> I'd like to add a System property that would provide the log name for SCR. If
> it is not set, the current behaviour is used.
> I can make this change if I get some feedback it is an acceptable idea.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)