Package com.jalios.jstore.jsync
Class JSyncLogger
- java.lang.Object
-
- com.jalios.jstore.jsync.JSyncLogger
-
- All Implemented Interfaces:
JSyncConstants
,JaliosConstants
public class JSyncLogger extends java.lang.Object implements JSyncConstants
This class writes logs JSyncReplica actions such as join, disjoin, update, etc.- Version:
- $Revision: 61968 $
- Author:
- Olivier Dedieu
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REVISION
-
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
-
Fields inherited from interface com.jalios.jstore.jsync.JSyncConstants
SC_BAD_ADDRESS, SC_BAD_LEADER, SC_BAD_MESSAGE, SC_DISCONNECTED, SC_INTERNAL_SERVER_ERROR, SC_JOIN_REJECTED, SC_LEADER_CANNOT_JOIN, SC_NO_ACK, SC_NO_SEND, SC_OK, SC_UNKNOWN, SC_UNKNOWN_URID, SC_URID_ALREADY_ADDED, STATUS_DISCONNECTED, STATUS_LEADER, STATUS_LONE, STATUS_MEMBER, STATUS_SUBLEADER
-
-
Constructor Summary
Constructors Constructor Description JSyncLogger(java.io.File logDir)
Constructs a new JSyncLogger
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(JSyncEvent event)
Add a JSyncEvent in the logjava.io.File
getLogFile(java.util.Date date)
Return the log file for the given datejava.util.List<java.io.File>
getLogFileList(java.util.Date beginDate, java.util.Date endDate)
Return a list of log file for the given date rangejava.lang.String
getStatusLabel(int sc, java.util.Locale locale)
Return the label of the given status code
-
-
-
Field Detail
-
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLogFile
public java.io.File getLogFile(java.util.Date date)
Return the log file for the given date- Parameters:
date
- the date- Returns:
- the log file for the given date
- Since:
- jcms-4.1
-
getLogFileList
public java.util.List<java.io.File> getLogFileList(java.util.Date beginDate, java.util.Date endDate)
Return a list of log file for the given date range- Parameters:
beginDate
- the begin dateendDate
- the end date- Returns:
- a List of File objects
- Since:
- jcms-4.1
-
getStatusLabel
public java.lang.String getStatusLabel(int sc, java.util.Locale locale)
Return the label of the given status code- Parameters:
sc
- the status code (must be a new status code value (e.g. 1101, 1200, ...)locale
- the locale to be used- Returns:
- the status label
- Since:
- jcms-4.1
-
add
public void add(JSyncEvent event)
Add a JSyncEvent in the log- Parameters:
event
- the JSyncEvent- Since:
- jcms-8.0.2
-
-