Software Programmer
asked on
Do we need to use MDC variable to append info to logger messages
Assume we have login controller where we identify user, company, session id, time etc.,
Now we want to add all these info by default in logger messages
Do we need to use MDC variable to put the key and values and log4j properties file needs to be defined as {sessionId}
MDC.put("sessionId", "121212");
Is this is the right approach or we need to do in a different way ?
Thanks.
Now we want to add all these info by default in logger messages
Do we need to use MDC variable to put the key and values and log4j properties file needs to be defined as {sessionId}
MDC.put("sessionId", "121212");
Is this is the right approach or we need to do in a different way ?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER