Package org.dspace.core
Class LogManager
- java.lang.Object
-
- org.dspace.core.LogManager
-
public class LogManager extends Object
Class for generating standard log header- Version:
- $Revision$
- Author:
- David Stuve, Robert Tansley
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringescapeLogField(String field)If any string within the log line contains a field separator (:) they need to be escaped so as the line may be parsed and analysed later.static StringgetHeader(Context context, String action, String extrainfo)Generate the log headerstatic StringunescapeLogField(String field)Unescape a log field.
-
-
-
Method Detail
-
getHeader
public static String getHeader(Context context, String action, String extrainfo)
Generate the log header- Parameters:
context- the current Context - safe to pass innullaction- string describing the actionextrainfo- string with extra information, like parameters- Returns:
- the filled out log header
-
escapeLogField
public static String escapeLogField(String field)
If any string within the log line contains a field separator (:) they need to be escaped so as the line may be parsed and analysed later. This method will escape a log field. Single slashes and colons will be escaped so that colons no longer appear in the logs- Parameters:
field- The unescaped log field- Returns:
- An escaped log field
-
-