public class Log4jKit extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MDC_JIRA_ASSESSION_ID |
static String |
MDC_JIRA_REQUEST_ID |
static String |
MDC_JIRA_REQUEST_IPADDR |
static String |
MDC_JIRA_REQUEST_URL |
static String |
MDC_JIRA_USERNAME |
| Constructor and Description |
|---|
Log4jKit() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearMDC()
Clears the logger's Mapped Diagnostic Context (MDC).
|
static Set<File> |
getAllLogFiles() |
static File |
getLogFileName(String appenderName)
Returns the full log file name for the given appender.
|
static void |
putASessionIdToMDC(String atlassianSessionId)
Sets the Atlassian Session Id into the logger's Mapped Diagnostic Context (MDC).
|
static void |
putToMDC(String userName,
String requestId,
String asessionId,
String requestURL,
String ipAddr)
Squirrels away request information into the logger's Mapped Diagnostic Context (MDC).
|
static void |
putUserToMDC(String userName)
Adds the user name to the logger's Mapped Diagnostic Context (MDC).
|
public static final String MDC_JIRA_USERNAME
public static final String MDC_JIRA_REQUEST_ID
public static final String MDC_JIRA_ASSESSION_ID
public static final String MDC_JIRA_REQUEST_URL
public static final String MDC_JIRA_REQUEST_IPADDR
public static File getLogFileName(String appenderName)
appenderName - the name of the appender in the log4j configurationpublic static Set<File> getAllLogFiles()
public static void putToMDC(String userName, String requestId, String asessionId, String requestURL, String ipAddr)
userName - the user name in playrequestId - the request idasessionId - the Atlassian Session ID (hash of session id)requestURL - the request URLipAddr - the ipaddress of the clint making the requestpublic static void putUserToMDC(String userName)
userName - the user name in playpublic static void putASessionIdToMDC(String atlassianSessionId)
atlassianSessionId - the session id in playpublic static void clearMDC()
Copyright © 2002-2020 Atlassian. All Rights Reserved.