Hi,
I am maintaining a project that contains a lot of groovy scripts with command
log.setLevel Level.DEBUG;
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.
Anyone? Thanks!
Albert
Solved! Go to Solution.
Hi Albert,
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...
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."
Changelog: http://logging.apache.org/log4j/2.x/changelog.html
Hi Albert,
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...
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."
Changelog: http://logging.apache.org/log4j/2.x/changelog.html
Hi everyone,
@Nastya_Khovrina, thank you for the explanation.
@AlbertSoapUI, did Anastasia's reply help? If so, do you mind marking it as a solution?
If it didn't help, we are looking forward to getting more details from you.
Thanks,
Hi Olga, Nastya,
Thank you for the elaborate information.
I was aware of the change, but was hoping for a simple workaround concerning that single line of code.
If removing those lines is the only simple workaround, then I will accept this as a solution.
Will wait a short while in case other suggestions come in.
Regards, Albert
Subject | Author | Latest Post |
---|---|---|