Package org.dspace.app.statistics
Class LogLine
- java.lang.Object
-
- org.dspace.app.statistics.LogLine
-
public class LogLine extends Object
This class represents a single log file line and the operations that can be performed on it The components that it represents are: Date, Level, User, Action, and additional Params- Author:
- Richard Jones
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanafterDate(Date date)find out if this log file line is after the given datebooleanbeforeDate(Date date)find out if this log file line is before the given dateStringgetAction()get the action being performedDategetDate()get the date of the log lineStringgetLevel()get the level of this log lineStringgetParams()get the parameters associated with the actionStringgetUser()get the user performing the logged actionbooleanisAction(String action)find out if the log line is of the given action.booleanisLevel(String level)find out if the log line is of the given level.
-
-
-
Method Detail
-
getDate
public Date getDate()
get the date of the log line- Returns:
- the date of this log line
-
getLevel
public String getLevel()
get the level of this log line- Returns:
- the level of the log line
-
getUser
public String getUser()
get the user performing the logged action- Returns:
- the user performing the logged action
-
getAction
public String getAction()
get the action being performed- Returns:
- the logged action
-
getParams
public String getParams()
get the parameters associated with the action- Returns:
- the parameters associated with the action
-
beforeDate
public boolean beforeDate(Date date)
find out if this log file line is before the given date- Parameters:
date- the date to be compared to- Returns:
- true if the line is before the given date, false if not
-
afterDate
public boolean afterDate(Date date)
find out if this log file line is after the given date- Parameters:
date- the date to be compared to- Returns:
- true if the line is after the given date, false if not
-
isLevel
public boolean isLevel(String level)
find out if the log line is of the given level. Levels are either INFO, WARN or ERROR- Parameters:
level- the level we want to test for- Returns:
- true if the line is of the specified level, false if not
-
isAction
public boolean isAction(String action)
find out if the log line is of the given action. Actions are not directly constrained by the vocabulary, and any system module may define any action name for its behaviour- Parameters:
action- the action we want to test for- Returns:
- true if the line is of the specified action, false if not
-
-