[
https://issues.apache.org/jira/browse/FELIX-6463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425009#comment-17425009
]
Heiko Studt commented on FELIX-6463:
------------------------------------
For the info log: You are probably right. Our environment is rather static so
that the info log would've mostly occurred at startup.
Further reduction is possible (thanks for the mile as I have asked for the inch
:)):
DependencyManager where "added" and "modified" both have (enter) and (exit)
logs which could be simplified to one in DEBUG.
[Field search
|https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/scr/src/main/java/org/apache/felix/scr/impl/inject/field/FieldUtils.java#L82]which
is always (only reference) prefixed by [getting
field|https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/scr/src/main/java/org/apache/felix/scr/impl/inject/field/FieldHandler.java#L360]
and suffixed by "[Found
field|https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/scr/src/main/java/org/apache/felix/scr/impl/inject/field/FieldHandler.java#L466]".
In my opinion only "found field" is correct. If I miss one of the fields, I
will open up the TRACE, but as there is always a log at the end (error or the
found field one), it won't be needed very often.
Probably, the same goes for "[locating
method|https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/scr/src/main/java/org/apache/felix/scr/impl/inject/methods/BaseMethod.java#L167]",
but it is referenced far more often (I did not go through).
"[This thread collected
dependencies|https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java#L1067]"
is also not quite useful without further information in my point of view, but
only one line.
> Changing log levels for DS component getState and registration
> --------------------------------------------------------------
>
> Key: FELIX-6463
> URL: https://issues.apache.org/jira/browse/FELIX-6463
> Project: Felix
> Issue Type: Improvement
> Components: Declarative Services (SCR)
> Reporter: Heiko Studt
> Priority: Major
>
> As a developer (having the debugger hat), I need to find the most standard
> problems most easily. Currently, DS services are logging hundreds and
> thousands of lines on startup into DEBUG but nearly nothing into INFO.
> So, in my opinion, Felix should reconsider the log levels of all its DS
> bundle startup loglines. The two most important ones (in my opinion) are
> argued below:
> Beginning with AbstractComponentManager::getState. The "Querying state" log
> should be in level TRACE, as that very state is written six times(!) for
> every state change 3xActivateInteral: (2x inside getState and then again in
> the "Activating" line itself) and analogous 3x for the real state change.
> Here, all four of these "Querying state" lines are superfluous and only
> necessary, if I search for deep felix implementation bugs.
> Reference:
> [https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java#L1427]
> Additionally, the registation changes of a component should be logged into
> INFO, instead of DEBUG. Then, I do not need to activate DEBUG for my DS based
> bundles in the first place (at least for most of my debugging efforts).
> [https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/scr/src/main/java/org/apache/felix/scr/impl/manager/RegistrationManager.java#L119]
>
> The two minor changes will improve the debugging experience alot and will
> reduce its needed time significantly. I will be glad to create a pull request
> if this issue is approved.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)