Class CallLog
- java.lang.Object
-
- org.exoplatform.webconferencing.support.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 Summary
Fields Modifier and Type Field Description static StringDEBUG_LEVELThe Constant DEBUG_LEVEL.static StringERROR_LEVELThe Constant ERROR_LEVEL.static StringINFO_LEVELThe Constant INFO_LEVEL.static intMESSAGE_CRITICAL_LENGTHLog message critical length.protected static intMESSAGE_CRITICAL_LENGTH_FINALThe Constant MESSAGE_CRITICAL_LENGTH_FINAL.static intMESSAGE_MAX_LENGTHLog message max length.static StringMESSAGE_NO_DATAThe Constant MESSAGE_NO_DATA.static intMESSAGES_BUFFER_EXPIRATION_MILLISMaximum expected age of a message not flushed to the logger.static intMESSAGES_BUFFER_MAX_SIZEMaximum messages buffer size after which we can flush it to the logger.static intMESSAGES_BUFFER_WAIT_MILLISHow long to wait between checks in flush thread.static StringTRACE_LEVELThe Constant TRACE_LEVEL.static StringWARN_LEVELThe Constant WARN_LEVEL.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(String msg)Debug message.voiddebug(String msg, LocalDateTime timestamp)Debug message with timestamp.voiderror(String msg)Error message.voiderror(String msg, LocalDateTime timestamp)Error message with timestamp.voidinfo(String msg)Info message.voidinfo(String msg, LocalDateTime timestamp)Info message with timestamp.voidtrace(String msg)Trace message.voidtrace(String msg, LocalDateTime timestamp)Trace message with timestamp.static Stringvalidate(String msg)Validate a message by cutting it if it is longer of 10240 bytes.protected StringvalidateFinal(String msg)Validate final.voidwarn(String msg)Warn message.voidwarn(String msg, LocalDateTime timestamp)Warn message with timestamp.
-
-
-
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_NO_DATA
public static final String MESSAGE_NO_DATA
The Constant MESSAGE_NO_DATA.- See Also:
- Constant Field Values
-
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 msgtimestamp- the timestamp, ifnullthen 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 msgtimestamp- the timestamp, ifnullthen 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 msgtimestamp- the timestamp, ifnullthen 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 msgtimestamp- the timestamp, ifnullthen 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 msgtimestamp- the timestamp, ifnullthen current time will be used
-
-