Interface LogHandler


  • public interface LogHandler
    Interface for handling logging sent form the guest of Proxy-WASM environment.

    This interface provides methods to log messages at different levels and to retrieve the current log level.

    • Field Detail

      • DEFAULT

        static final LogHandler DEFAULT
        A default, no-operation LogHandler. It ignores all log messages and reports LogLevel.CRITICAL as the current log level, effectively disabling logging.

        Useful as a placeholder or when logging is explicitly disabled.

      • SYSTEM

        static final LogHandler SYSTEM
        A simple LogHandler that logs all messages to System.out. Messages are prefixed with their corresponding LogLevel. The effective log level for this handler is LogLevel.TRACE, meaning all messages will be printed.
    • Method Detail

      • log

        default void log​(LogLevel level,
                         String message)
                  throws WasmException
        Logs a message at the specified log level.
        Parameters:
        level - the log level
        message - the message to log
        Throws:
        WasmException - the result to provide the plugin
      • getLogLevel

        default LogLevel getLogLevel()
                              throws WasmException
        Gets the current log level.
        Returns:
        the current log level
        Throws:
        WasmException - the result to provide the plugin