on 2023 Aug 31 8:11 PM
Request clarification before answering.
Hi xsalgadog,
get the Logger from the LoggerFactory on class level:
private static final Logger LOG = LoggerFactory.getLogger(MainClass.class)After that you can use the LOG instance where ever you need it. E.g.
LOG.error("I am logging an exception with a parameter...: {}", myVar, e);HTH
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.