How can we set a higher version of Log4j to grails app

Viewed 2467

I have my log4j settings in my grails app with version 2.4.3. And my log4j version inside the lib folder is 1.2.17 (the compatible version of grails 2.4.3). Due to the log4j exploit issue, I need to upgrade my log4j version to 2.16.0. How can I do the necessary configurations to point my existing grails app to the latest log4j?

1 Answers

In BuildConfig.groovy file, with some that following lines, you can upgrade version of log4j, into "dependences" section:

compile 'org.apache.logging.log4j:log4j-core:2.16.0'

compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.16.0'

However, when I add dependence, the old version of log4j (1.2.17) is not deleted, so I´m not sure what version is using.

Related