io.agora.rtc

## Class AgoraLogger

- java.lang.Object
- - io.agora.rtc.AgoraLogger

-     public class AgoraLogger
      extends java.lang.Object

  High-performance logging utility class designed for Agora SDK. Provides configurable log levels and performance optimizations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static boolean` | `allLogsEnabled` Global switch to control all logging
    `private static boolean` | `debugEnabled` Debug log level control
    `private static boolean` | `errorEnabled` Error log level control
    `private static boolean` | `infoEnabled` Info log level control
    `private static java.util.logging.Logger` | `logger` Logger instance for Agora Server Java SDK
    `private static boolean` | `performanceLoggingEnabled` Performance monitoring logging control
    `private static boolean` | `warnEnabled` Warning log level control

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `AgoraLogger()` Private constructor to prevent instantiation.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `configureLogLevel(java.util.logging.Level level)` Configure log level.
    `static void` | `debug(java.lang.String message)` Debug level log - output only in debug mode.
    `static void` | `debug(java.lang.String format, java.lang.Object... args)` Debug level log - optimized for delayed string concatenation.
    `static void` | `enablePerformanceLogging(boolean enable)` Enable or disable performance logging.
    `static void` | `error(java.lang.String message)` Error level log.
    `static void` | `error(java.lang.String format, java.lang.Object... args)` Error level log - optimized for delayed string concatenation.
    `static void` | `error(java.lang.String message, java.lang.Throwable throwable)` Error level log - includes exception information.
    `static void` | `info(java.lang.String message)` Info level log.
    `static void` | `info(java.lang.String format, java.lang.Object... args)` Info level log - optimized for delayed string concatenation.
    `static boolean` | `isDebugEnabled()` Check if the specified log level is enabled.
    `static boolean` | `isErrorEnabled()` Check if the ERROR log level is enabled.
    `static boolean` | `isInfoEnabled()` Check if the INFO log level is enabled.
    `static boolean` | `isWarnEnabled()` Check if the WARN log level is enabled.
    `static void` | `performance(java.lang.String operation, long startTime)` Performance monitoring log.
    `static void` | `setAllLogsEnabled(boolean enable)` Globally enable or disable all log outputs.
    `static void` | `trace(java.lang.String methodName, java.lang.Object... params)` Method call tracing - enabled only in debug mode.
    `static void` | `warn(java.lang.String message)` Warning level log.
    `static void` | `warn(java.lang.String format, java.lang.Object... args)` Warning level log - optimized for delayed string concatenation.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          private static final java.util.logging.Logger logger

      Logger instance for Agora Server Java SDK

    - #### allLogsEnabled

          private static volatile boolean allLogsEnabled

      Global switch to control all logging

    - #### debugEnabled

          private static volatile boolean debugEnabled

      Debug log level control

    - #### infoEnabled

          private static volatile boolean infoEnabled

      Info log level control

    - #### warnEnabled

          private static volatile boolean warnEnabled

      Warning log level control

    - #### errorEnabled

          private static volatile boolean errorEnabled

      Error log level control

    - #### performanceLoggingEnabled

          private static volatile boolean performanceLoggingEnabled

      Performance monitoring logging control

  - ### Constructor Detail

    - #### AgoraLogger

          private AgoraLogger()

      Private constructor to prevent instantiation. This is a utility class with only static methods.

  - ### Method Detail

    - #### configureLogLevel

          public static void configureLogLevel(java.util.logging.Level level)

      Configure log level.
      Parameters:
        `level` - the log level to configure

    - #### enablePerformanceLogging

          public static void enablePerformanceLogging(boolean enable)

      Enable or disable performance logging.
      Parameters:
        `enable` - true to enable performance logging, false to disable it

    - #### setAllLogsEnabled

          public static void setAllLogsEnabled(boolean enable)

      Globally enable or disable all log outputs.
      Parameters:
        `enable` - false to disable all logs, true to re-enable them according to the configured log level.

    - #### debug

          public static void debug(java.lang.String message)

      Debug level log - output only in debug mode.
      Parameters:
        `message` - the message to log

    - #### debug

          public static void debug(java.lang.String format,
                                   java.lang.Object... args)

      Debug level log - optimized for delayed string concatenation.
      Parameters:
        `format` - the format string
        `args` - the arguments to format the string

    - #### info

          public static void info(java.lang.String message)

      Info level log.
      Parameters:
        `message` - the message to log

    - #### info

          public static void info(java.lang.String format,
                                  java.lang.Object... args)

      Info level log - optimized for delayed string concatenation.
      Parameters:
        `format` - the format string
        `args` - the arguments to format the string

    - #### warn

          public static void warn(java.lang.String message)

      Warning level log.
      Parameters:
        `message` - the message to log

    - #### warn

          public static void warn(java.lang.String format,
                                  java.lang.Object... args)

      Warning level log - optimized for delayed string concatenation.
      Parameters:
        `format` - the format string
        `args` - the arguments to format the string

    - #### error

          public static void error(java.lang.String message)

      Error level log.
      Parameters:
        `message` - the message to log

    - #### error

          public static void error(java.lang.String format,
                                   java.lang.Object... args)

      Error level log - optimized for delayed string concatenation.
      Parameters:
        `format` - the format string
        `args` - the arguments to format the string

    - #### error

          public static void error(java.lang.String message,
                                   java.lang.Throwable throwable)

      Error level log - includes exception information.
      Parameters:
        `message` - the message to log
        `throwable` - the throwable to log

    - #### performance

          public static void performance(java.lang.String operation,
                                         long startTime)

      Performance monitoring log.
      Parameters:
        `operation` - the operation to log
        `startTime` - the start time of the operation

    - #### trace

          public static void trace(java.lang.String methodName,
                                   java.lang.Object... params)

      Method call tracing - enabled only in debug mode.
      Parameters:
        `methodName` - the method name to log
        `params` - the parameters to log

    - #### isDebugEnabled

          public static boolean isDebugEnabled()

      Check if the specified log level is enabled.
      Returns:
        true if the specified log level is enabled, false otherwise

    - #### isInfoEnabled

          public static boolean isInfoEnabled()

      Check if the INFO log level is enabled.
      Returns:
        true if the INFO log level is enabled, false otherwise

    - #### isWarnEnabled

          public static boolean isWarnEnabled()

      Check if the WARN log level is enabled.
      Returns:
        true if the WARN log level is enabled, false otherwise

    - #### isErrorEnabled

          public static boolean isErrorEnabled()

      Check if the ERROR log level is enabled.
      Returns:
        true if the ERROR log level is enabled, false otherwise