Logger
Manages the logging mechanism for Nativeblocks. Its allows the registration and retrieval of custom loggers with implementing the INativeLogger protocol.
INativeLogger
Defines the contract for logging events within the native framework.
public protocol INativeLogger
Requirements
log(level:event:message:parameters:)
Logs an event with a name and associated parameters.
func log(
level: LoggerEventLevel,
event: String,
message: String,
parameters: [String: String]
)
Parameters
- level: The severity of the log (INFO, WARNING, ERROR).
- event: The event type (from LoggerEventType).
- message: A human-readable message for the log.
- parameters: Optional key-value pairs with event-specific data.