Groovy command log.setLevel generates compiling errors after upgrading to ReadyAPI 2.5.0
I am maintaining a project that contains a lot of groovy scripts with command
If I upgrade to ReadyAPI 2.5.0 this generates compiling errors, as included library log4j 2 does no longer implement this method:
groovy.lang.MissingMethodException: No signature of method: org.apache.logging.log4j.core.Logger.setLevel() is applicable for argument types: (org.apache.log4j.Level) values:
Is there a simple one-line substitution possible for this command?
I have been looking around, but apache seems to suggest much more complicated solutions to manage control over log levels.
Now I just simply comment the lines with 'log.setLevel', as I am not so much interested in it now, but things may change.
Please refer to this topic to learn the libraries that have been removed from, added to, or updated in ReadyAPI 2.5.0: https://support.smartbear.com/readyapi/docs/general-info/version-history/libraries-updated-in-latest-ver.html
Also, please refer to the following articles which should help you:
Migrating from Log4j 1.x: http://logging.apache.org/log4j/2.x/manual/migration.html
"Calls to org.apache.log4j.Logger.setLevel() or similar methods are not supported in the API. Applications should remove these. Equivalent functionality is provided in the Log4j 2 implementation classes, see org.apache.logging.log4j.core.config.Configurator.setLevel(), but may leave the application susceptible to changes in Log4j 2 internals."