|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etools.logging.util.LoggingUtilities
Constructor Summary | |
---|---|
LoggingUtilities()
|
Method Summary | |
---|---|
protected static void |
archiveFile(java.lang.String filePath)
|
protected static void |
closeFileHandle(java.lang.String filePath)
|
protected static void |
closeFileHandle(java.lang.String filePath,
int dataStructIndicator)
Closes the previously created file handle and removes the instance from the hashtable of previously created file handles if no other loggers are currently writing to the parameter file. |
protected static void |
closeRAFileHandle(java.lang.String filePath)
|
static java.lang.String |
currentTimeSeconds()
Returns the number of seconds (fractional precision) between January 1, 1970, 00:00:00 GMT and the current time represented as a String. |
protected static void |
deleteArchivedFiles(java.lang.String filePath,
int archiveExpiryDays)
|
static IConfigurationElement |
getConfigurationElement(java.lang.String pluginId,
java.lang.String extensionPointId,
java.lang.String configurationElementName)
Resolves the first configuration element identified by the parameter configuration element name that is in the first extension to an extension point identified by the parameter extension point ID contributed by the plug-in identified by the parameter plug-in ID. |
static java.lang.String |
getCurrThreadStack()
Captures the stack trace of the current thread |
static java.lang.String |
getEnvironmentVariable(java.lang.String variableName)
|
static java.util.Properties |
getEnvironmentVariables()
|
protected static java.io.BufferedWriter |
getFileHandle(java.lang.String filePath)
Returns a file handle to the parameter log file either from a hashtable of previously created file handles or creates a new file handle if the parameter file has not been previously opened for writing. |
protected static java.io.RandomAccessFile |
getRandomAFH(java.lang.String filePath)
Returns a random access file handle to the parameter log file either from a hashtable of previously created file handles or creates a new file handle if the parameter file has not been previously opened for writing. |
static java.lang.String |
getResourceString(java.lang.String key)
|
static java.lang.String |
getResourceString(java.lang.String key,
java.lang.String argument)
|
static java.lang.String |
getResourceString(java.lang.String key,
java.lang.String[] arguments)
|
static java.lang.String |
getResourceString(java.lang.String key,
java.lang.String argumentA,
java.lang.String argumentB)
|
static java.lang.String |
getResourceString(java.lang.String key,
java.lang.String argumentA,
java.lang.String argumentB,
java.lang.String argumentC)
|
static java.lang.String |
getThreadStackTrace(java.lang.Thread thread)
Deprecated. This method does not return the stack trace of the passed Thread. It only returns the stack trace of the current thread. (Equivalent to getCurrThreadStack()) Captures the stack trace of the parameter thread in a String. |
static java.lang.String |
getThrowableStackTrace(java.lang.Throwable throwable)
Captures the stack trace of the parameter throwable (i.e. |
protected static void |
initArchiving(java.lang.String fileName)
1) Removes the process Id assigned to a given file (that is if a process id has been assigned) 2) Removes 'fileName' from the archive files (if it has been recorded) |
static boolean |
isValidLoggerName(java.lang.String name)
|
static boolean |
isWorkbench()
|
static java.lang.String |
objectToString(java.lang.Object obj)
Converts the parameter Object to a String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LoggingUtilities()
Method Detail |
protected static void archiveFile(java.lang.String filePath)
protected static void deleteArchivedFiles(java.lang.String filePath, int archiveExpiryDays)
protected static java.io.BufferedWriter getFileHandle(java.lang.String filePath)
protected static java.io.RandomAccessFile getRandomAFH(java.lang.String filePath)
filePath
- name and path of the output log file which to open/retrieve a file handle.
protected static void closeFileHandle(java.lang.String filePath, int dataStructIndicator)
filePath
- - name and path of the output log file which to potentially close the file handle.
dataStructIndicator - Indicates the data structure to be used for retreiving the file handleprotected static void closeFileHandle(java.lang.String filePath)
protected static void closeRAFileHandle(java.lang.String filePath)
protected static void initArchiving(java.lang.String fileName)
public static java.lang.String getThrowableStackTrace(java.lang.Throwable throwable)
throwable
- exception or error which the stack trace is captured.
public static java.lang.String getThreadStackTrace(java.lang.Thread thread)
thread
- thread which the stack trace is captured.
public static java.lang.String getCurrThreadStack()
public static java.lang.String objectToString(java.lang.Object obj)
obj
- Object or array to be converted to a String.
public static boolean isWorkbench()
public static boolean isValidLoggerName(java.lang.String name)
public static java.lang.String currentTimeSeconds()
public static java.lang.String getResourceString(java.lang.String key)
public static java.lang.String getResourceString(java.lang.String key, java.lang.String argument)
public static java.lang.String getResourceString(java.lang.String key, java.lang.String argumentA, java.lang.String argumentB)
public static java.lang.String getResourceString(java.lang.String key, java.lang.String argumentA, java.lang.String argumentB, java.lang.String argumentC)
public static java.lang.String getResourceString(java.lang.String key, java.lang.String[] arguments)
public static java.lang.String getEnvironmentVariable(java.lang.String variableName)
public static java.util.Properties getEnvironmentVariables()
public static IConfigurationElement getConfigurationElement(java.lang.String pluginId, java.lang.String extensionPointId, java.lang.String configurationElementName)
The same plug-in identified by the parameter plug-in ID will contain zero or a positive number of extensions to an extension point identified by the parameter extension point ID. Furthermore, the same extension to an extension point identified by the parameter extension point ID will contain zero or a positive number of configuration elements identified by the parameter configuration element name. As such, the returned configuration element is the first configuration element identified by the parameter configuration element name that is in the first extension to an extension point identified by the parameter extension point ID contributed by the plug-in identified by the parameter plug-in ID.
If there is no configuration element identified by the parameter
configuration element name that is in the first extension to an extension
point identified by the parameter extension point ID contributed
by the plug-in identified by the parameter plug-in ID, null
is returned.
pluginId
- The non-null and positive length unique ID of the plug-in that extends the extension point.extensionPointId
- The non-null and positive length unique ID of the extension point that is extended.configurationElementName
- The non-null and positive length unique name of the configuration element in the extension point.
null
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |