-
|
Hallo everyone, We use such After upgrading the PMD analyser tools it now shows a warning that the
gets a reference and not a copy of the context and therefore if I would close the context after I set the URL of the config file it would be lost? Similar question after someone of my team noticed that (at least on his maschine) the configuration setting What are your thoughts about this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I can at least answer this part: As expected: If you close it, your logger will be closed as well and the app no longer logs. |
Beta Was this translation helpful? Give feedback.
-
Yes,
I would rather save the Every (explicit or implicit) call to |
Beta Was this translation helpful? Give feedback.
@Bukama,
Yes,
loggerContextis a reference to the logger context and if you close it, it shuts down. I am not sure why theAutoCloseableinterface was added toLoggerContext, since in most situation you don't want to use it in atry with res…