Class JSyncLogger

java.lang.Object
com.jalios.jstore.jsync.JSyncLogger
All Implemented Interfaces:
JSyncConstants, JaliosConstants

public class JSyncLogger extends Object implements JSyncConstants
This class writes logs JSyncReplica actions such as join, disjoin, update, etc.
Author:
Olivier Dedieu
  • Constructor Details

    • JSyncLogger

      public JSyncLogger(File logDir)
      Constructs a new JSyncLogger
      Parameters:
      logDir - the log directory
      Since:
      jcms-4.1
  • Method Details

    • getLogFile

      public File getLogFile(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 List<File> getLogFileList(Date beginDate, Date endDate)
      Return a list of log file for the given date range
      Parameters:
      beginDate - the begin date
      endDate - the end date
      Returns:
      a List of File objects
      Since:
      jcms-4.1
    • getStatusLabel

      public String getStatusLabel(int sc, 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