Class CallLog


  • public class CallLog
    extends Object
    Diagnostic logging support for user calls. This class gathers all logs related to the call, from preparation of UI to processing a conversation.
    Created by The eXo Platform SAS
    Version:
    $Id: CallLog.java 00000 Dec 20, 2017 pnedonosko $
    Author:
    Peter Nedonosko
    • Field Detail

      • TRACE_LEVEL

        public static final String TRACE_LEVEL
        The Constant TRACE_LEVEL.
      • DEBUG_LEVEL

        public static final String DEBUG_LEVEL
        The Constant DEBUG_LEVEL.
      • INFO_LEVEL

        public static final String INFO_LEVEL
        The Constant INFO_LEVEL.
      • WARN_LEVEL

        public static final String WARN_LEVEL
        The Constant WARN_LEVEL.
      • ERROR_LEVEL

        public static final String ERROR_LEVEL
        The Constant ERROR_LEVEL.
      • MESSAGE_MAX_LENGTH

        public static final int MESSAGE_MAX_LENGTH
        Log message max length.
        See Also:
        Constant Field Values
      • MESSAGE_CRITICAL_LENGTH

        public static final int MESSAGE_CRITICAL_LENGTH
        Log message critical length. Values longer of this will be cut by the logger.
        See Also:
        Constant Field Values
      • MESSAGE_CRITICAL_LENGTH_FINAL

        protected static final int MESSAGE_CRITICAL_LENGTH_FINAL
        The Constant MESSAGE_CRITICAL_LENGTH_FINAL.
        See Also:
        Constant Field Values
      • MESSAGES_BUFFER_MAX_SIZE

        public static final int MESSAGES_BUFFER_MAX_SIZE
        Maximum messages buffer size after which we can flush it to the logger.
        See Also:
        Constant Field Values
      • MESSAGES_BUFFER_EXPIRATION_MILLIS

        public static final int MESSAGES_BUFFER_EXPIRATION_MILLIS
        Maximum expected age of a message not flushed to the logger.
        See Also:
        Constant Field Values
      • MESSAGES_BUFFER_WAIT_MILLIS

        public static final int MESSAGES_BUFFER_WAIT_MILLIS
        How long to wait between checks in flush thread.
        See Also:
        Constant Field Values
    • Method Detail

      • validate

        public static String validate​(String msg)
        Validate a message by cutting it if it is longer of 10240 bytes.
        Parameters:
        msg - the msg
        Returns:
        the string
      • info

        public void info​(String msg)
        Info message.
        Parameters:
        msg - the msg
      • info

        public void info​(String msg,
                         LocalDateTime timestamp)
        Info message with timestamp.
        Parameters:
        msg - the msg
        timestamp - the timestamp, if null then current time will be used
      • warn

        public void warn​(String msg)
        Warn message.
        Parameters:
        msg - the msg
      • warn

        public void warn​(String msg,
                         LocalDateTime timestamp)
        Warn message with timestamp.
        Parameters:
        msg - the msg
        timestamp - the timestamp, if null then current time will be used
      • error

        public void error​(String msg)
        Error message.
        Parameters:
        msg - the msg
      • error

        public void error​(String msg,
                          LocalDateTime timestamp)
        Error message with timestamp.
        Parameters:
        msg - the msg
        timestamp - the timestamp, if null then current time will be used
      • debug

        public void debug​(String msg)
        Debug message.
        Parameters:
        msg - the msg
      • debug

        public void debug​(String msg,
                          LocalDateTime timestamp)
        Debug message with timestamp.
        Parameters:
        msg - the msg
        timestamp - the timestamp, if null then current time will be used
      • trace

        public void trace​(String msg)
        Trace message.
        Parameters:
        msg - the msg
      • trace

        public void trace​(String msg,
                          LocalDateTime timestamp)
        Trace message with timestamp.
        Parameters:
        msg - the msg
        timestamp - the timestamp, if null then current time will be used
      • validateFinal

        protected String validateFinal​(String msg)
        Validate final.
        Parameters:
        msg - the msg
        Returns:
        the string