on 2023 Aug 31 8:11 PM
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.
User | Count |
---|---|
29 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.