Class DittoLogDecorator
java.lang.Object
com.ditto.java.DittoLogDecorator
Provides customization of Ditto's logging output.
A log decorator allows you to intercept and modify or augment log messages before they are passed to the logging system. Use this to add custom formatting, filtering, or metadata to Ditto's log output.
Set a custom log decorator using DittoLog.setLogDecorator(DittoLogDecorator).
-
Method Summary
Modifier and TypeMethodDescriptionvoidlog(@NonNull DittoLogLevel logLevel, @NonNull String tag, @NonNull String message, @Nullable Throwable error) Logs a message with the specified log level, tag, message, and optional error.
-
Method Details
-
log
public void log(@NonNull DittoLogLevel logLevel, @NonNull String tag, @NonNull String message, @Nullable Throwable error) Logs a message with the specified log level, tag, message, and optional error.
This method is called by Ditto's logging system to emit log messages. When implementing a custom log decorator, override this method to customize how logs are processed.
- Parameters:
logLevel- theDittoLogLevelindicating the severity of the message.tag- the tag identifying the source or category of the log message.message- the log message content.error- an optionalThrowableassociated with the log message, ornull.
-