org.dspace.core
Class LogManager

java.lang.Object
  extended by org.dspace.core.LogManager

public class LogManager
extends Object

Class for generating standard log header

Version:
$Revision: 3762 $
Author:
David Stuve, Robert Tansley

Constructor Summary
LogManager()
           
 
Method Summary
static String escapeLogField(String field)
          If any string within the log line contains a field seperator (:) they need to be escaped so as the line may be parsed and analysed later.
static String getHeader(Context context, String action, String extrainfo)
          Generate the log header
static String unescapeLogField(String field)
          Unescape a log field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogManager

public LogManager()
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 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 seperator (:) 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


Copyright © 2010 DuraSpace. All Rights Reserved.