Class LogHelper

java.lang.Object
org.dspace.core.LogHelper

public class LogHelper extends Object
Class for generating standard log header
Version:
$Revision$
Author:
David Stuve, Robert Tansley
  • Method Details

    • getHeader

      public static String getHeader(Context context, String action, String extrainfo)
      Generate the log header
      Parameters:
      context - the current Context - safe to pass in null
      action - string describing the action
      extrainfo - 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
    • unescapeLogField

      public static String unescapeLogField(String field)
      Unescape a log field.
      Parameters:
      field - The escaped log field
      Returns:
      the original log field