Class CoreLogger

  • All Implemented Interfaces:
    logger.CoreLogger

    public class CoreLogger
    extends java.lang.Object
    implements logger.CoreLogger
    The CoreLogger proxy class. This is the class that should be instantiated by all objects that want's to use the Core logging utility.

    The CoreLogger proxy class will call the CoreLoggerBroker object, which decides whether to call the local CoreLoggerServer object or a remote CoreLoggerBroker object.

    Example:

     CoreLogger logger = new CoreLogger();
     logger.system.warning("File read error");
     

    Log types and severity levels
    There are five different log types:

    • System log - Logs system events, warnings, and errors. Levels supported are FATAL, WARNING, INFO, DEBUG, and TRACE.
    • Audit log - Logs transactions. The only supported levels are WARNING and INFO.
    • Billing log - Logs billing transactions. The only supported level is INFO.
    • HTTP log - Logs HTTP requests. The only supported level is INFO.
    • RADIUS log - Logs RADIUS packet information. The only supported level is INFO.
    • Constructor Detail

      • CoreLogger

        public CoreLogger()
        Constructs a new CoreLogger.
      • CoreLogger

        public CoreLogger​(int wrappedLevels)
        Constructs a new CoreLogger with the number of levels that this class is wrapped.

        Use this constructor if the CoreLogger class is wrapped, for instance if the calling method is a plugin or is in C++ code using JNI to access this Java code.

        Parameters:
        wrappedLevels - The number of levels that this class is wrapped. Set to 0 (default) for normal use, set to 1 if the logger is wrapped 1 level.
    • Method Detail

      • isDebugEnabled

        public boolean isDebugEnabled()
        Returns true if debug is enabled for the system. False is returned otherwise.
        Specified by:
        isDebugEnabled in interface logger.CoreLogger
        Returns:
        True if debug is enabled, false otherwise.
      • printStackTrace

        public void printStackTrace​(java.lang.Throwable e)
        Prints an exception's stack trace to stderr if debug is enabled.
        Specified by:
        printStackTrace in interface logger.CoreLogger
        Parameters:
        e - An exception to print.
      • getMaxPacketSize

        public int getMaxPacketSize()
        Specified by:
        getMaxPacketSize in interface logger.CoreLogger
        Returns:
        the maxLogSize
      • audit

        public logger.CoreLogger.AuditLog audit()
        Specified by:
        audit in interface logger.CoreLogger
      • system

        public logger.CoreLogger.SystemLog system()
        Specified by:
        system in interface logger.CoreLogger
      • replaceArgumentIndexes

        public static java.lang.String replaceArgumentIndexes​(java.lang.String message,
                                                              int amountToAdd)