ppkarwasz commented on PR #3394: URL: https://github.com/apache/logging-log4j2/pull/3394#issuecomment-2595266717
> so should i just revert back the changes i made to the ScriptFilter.java file and and make changes to the processRootNode method in the AbstractConfiguration and update the logic? The `AbstractConfiguration.doConfigure()` method seems to be a better choice. > The logic would be: > 1. Process first, as it currently does. > 2. Process script-related components (ScriptPatternSelector, Routes, ScriptFilter, etc.) after to ensure their dependencies are resolved. > 3. Process all remaining components afterward. It is hard to identify the script-related components. It is easier to make sure that the [`Scripts`](https://logging.apache.org/log4j/2.x/javadoc/log4j-core/org/apache/logging/log4j/core/config/ScriptsPlugin.html) container is processed at the beginning, so that the scripts are already registered, when `ScriptFilter` and company are instantiated. This means: 1. Process the nodes of type `Arbiter` to modify the configuration tree. This is what `doConfigure()` already does. 2. Process the "Properties" plugin first, as the current code does. If the "Properties" plugin is not present, the current code uses something else to initialize the interpolator. 3. Process the "Scripts" plugin next, to register all the scripts. 4. Process the remaining components (skipping "Properties" and "Scripts"). > is this how i should keep my approach? It is one of the possible approaches, probably the easiest to implement. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org