Package org.silverpeas.core.util.logging
Class LogsAccessor
- java.lang.Object
-
- org.silverpeas.core.util.logging.LogsAccessor
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LogsAccessor
get()
Set<String>
getAllLogs()
Gets the name of the logs in used in Silverpeas.List<String>
getLastLogRecords(String log, int recordCount)
Gets the specified last number of records from the specified log.
Empty line at end of file is skipped.
-
-
-
Method Detail
-
get
public static LogsAccessor get()
-
getAllLogs
public Set<String> getAllLogs() throws IOException
Gets the name of the logs in used in Silverpeas.- Returns:
- a set of Silverpeas logs.
- Throws:
IOException
- if an error occurs while accessing the logs.
-
getLastLogRecords
public List<String> getLastLogRecords(String log, int recordCount) throws org.silverpeas.kernel.SilverpeasException
Gets the specified last number of records from the specified log.
Empty line at end of file is skipped.- Parameters:
log
- the log to access.recordCount
- the number of records to get. O or a negative value means all the records.- Returns:
- an array of the last log records in the log at the time it was accessed.
- Throws:
org.silverpeas.kernel.SilverpeasException
- if either the specified log doesn't exist or an error occurred wile or if the log name contains relative path.
-
-