Package 

Interface StreamLogger


  • 
    public interface StreamLogger
    
                        

    Defines a logging contract for the Stream SDK.

    Implementations of this interface provide a way to log messages and exceptions at different severity levels. By default, convenience functions are provided for each log level (e.g., d, e, i, w, v).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class StreamLogger.LogLevel

      Represents the severity of a log message.

    • Method Summary

      Modifier and Type Method Description
      Unit d(Function0<String> message) Logs a debug message.
      Unit e(Function0<String> message) Logs an error message.
      Unit e(Throwable throwable, Function0<String> message) Logs an error with an optional message.
      Unit w(Function0<String> message) Logs a warning message.
      Unit i(Function0<String> message) Logs an informational message.
      Unit v(Function0<String> message) Logs a verbose message.
      abstract Unit log(StreamLogger.LogLevel level, Throwable throwable, Function0<String> message) Logs a message at the given severity level.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • d

         Unit d(Function0<String> message)

        Logs a debug message.

        Parameters:
        message - A lambda returning the message to log.
      • e

         Unit e(Function0<String> message)

        Logs an error message.

        Parameters:
        message - A lambda returning the message to log.
      • e

         Unit e(Throwable throwable, Function0<String> message)

        Logs an error with an optional message.

        Parameters:
        throwable - The error or exception to log.
        message - An optional lambda returning a message to include.
      • w

         Unit w(Function0<String> message)

        Logs a warning message.

        Parameters:
        message - A lambda returning the message to log.
      • i

         Unit i(Function0<String> message)

        Logs an informational message.

        Parameters:
        message - A lambda returning the message to log.
      • v

         Unit v(Function0<String> message)

        Logs a verbose message.

        Parameters:
        message - A lambda returning the message to log.
      • log

         abstract Unit log(StreamLogger.LogLevel level, Throwable throwable, Function0<String> message)

        Logs a message at the given severity level.

        Parameters:
        level - The log level at which the message should be logged.
        throwable - An optional Throwable associated with the log message.
        message - A lambda returning the message to log.