|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.log.Log4jKit
public class Log4jKit
A class to help with log4j related code
Constructor Summary | |
---|---|
Log4jKit()
|
Method Summary | |
---|---|
static void |
clearMDC()
This will clear out all the values in the log4j MDC . |
static Set<String> |
getAllLogFiles()
|
static String |
getLogFileName(String appenderName)
Returns the full log file name for the given appender. |
static void |
putToMDC(String userName,
String requestId,
String asessionId,
String requestURL)
This squirels away request information into the log4j MDC . |
static void |
putUserToMDC(String userName)
This will add the user name to the log4j MDC |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Log4jKit()
Method Detail |
---|
public static String getLogFileName(String appenderName)
appenderName
- the name of the appender in the log4j configuration
public static Set<String> getAllLogFiles()
public static void putToMDC(String userName, String requestId, String asessionId, String requestURL)
MDC
.
userName
- the user name in playrequestId
- the request idasessionId
- the Atlassian Session ID (hash of session id)requestURL
- the request URLpublic static void putUserToMDC(String userName)
MDC
userName
- the user name in playpublic static void clearMDC()
MDC
. This should be done in a finally
block perhaps on the outer edge of a request and probably in the start of the request as well.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |