Package io.roastedroot.proxywasm
Interface LogHandler
-
public interface LogHandlerInterface 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 Summary
Fields Modifier and Type Field Description static LogHandlerDEFAULTA default, no-operationLogHandler.static LogHandlerSYSTEMA simpleLogHandlerthat logs all messages toSystem.out.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default LogLevelgetLogLevel()Gets the current log level.default voidlog(LogLevel level, String message)Logs a message at the specified log level.
-
-
-
Field Detail
-
DEFAULT
static final LogHandler DEFAULT
A default, no-operationLogHandler. It ignores all log messages and reportsLogLevel.CRITICALas the current log level, effectively disabling logging.Useful as a placeholder or when logging is explicitly disabled.
-
SYSTEM
static final LogHandler SYSTEM
A simpleLogHandlerthat logs all messages toSystem.out. Messages are prefixed with their correspondingLogLevel. The effective log level for this handler isLogLevel.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 levelmessage- 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
-
-