-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change to log4j2 logging library implementation for logging messages (components choose log4j 1.2 api or log4j 2 api to generate messages) #6397
Conversation
This work is going well, you can try running it right now using log4j-core backend. One odd thing was core requiring use of bridge to slf4j 1.7 api for running apacheds; while the workers require a newer slf4j18 bridge to support slf4j1.8 api for camel. |
@juanluisrp what do you think about doing this work in several steps? The use of log4j-core as a back end is now complete for example. If we merge this you could sort out your camel dependencies. |
You are welcome to merge 6397 as is; the part that does not work is the harvesters. Log4j does not want us to dynamically create appenders as programmers; instead it strictly wants everything defined by the configuration (so the sys admin as control). So the approach to use is to:
Reference: |
This was causing warnings on startup
This duplicates code between LoggingApi and healthmonitor LogConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done minimal testing (harvesters, metadata creation, thesaurus, searches, pdf export) including the changes from jodygarnett#2 also and looks no, no issues found.
The application starts up now properly in Tomcat.
/** | ||
* This is the name of the RollingFileAppender in your log4j2.xml configuration file. | ||
* | ||
* LogConofig uses this name to lookup RollingFileAppender to check configuration in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo in LogConofig
…obably dropped already).
This can be used in various places (LoggingApi, Harvesters) to retrieve it.
# Conflicts: # common/src/main/java/org/fao/geonet/utils/Log.java
@fxprunayre there is nothing to be done here, I will wait for it to be merged |
….2.17. The log from the libraries using log2j 1.2 should work fine, using the log4j 1.x bridge. Related to geonetwork#6397
This has for the most part gone quite smoothly, the log4j 1.2 bridge is available to continue supporting the existing log4j 1.2 xml configurations which we have tested. Also tested the harvester logging continues to work as expected (where it programmatically adds an file appender).
Phase 1:
Phase 2:
Reference: