Package org.dspace.core
Class LogHelper
java.lang.Object
org.dspace.core.LogHelper
Class for generating standard log header
- Version:
- $Revision$
- Author:
- David Stuve, Robert Tansley
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 StringGenerate the log headerstatic StringunescapeLogField(String field) Unescape a log field.
-
Method Details
-
getHeader
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
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
-
unescapeLogField
Unescape a log field.- Parameters:
field- The escaped log field- Returns:
- the original log field
-