Class 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
    • Constructor Detail

      • JSyncLogger

        public JSyncLogger​(java.io.File logDir)
        Constructs a new JSyncLogger
        Parameters:
        logDir - the log directory
        Since:
        jcms-4.1
    • 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 date
        endDate - 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