Lens Scripting API

    A logger that outputs messages with filtering based on configurable log level thresholds.

    Each message is tagged with the identifier provided in the constructor for easier filtering when viewing logs.

    Log level can be configured through a LogLevelProvider passed to the constructor and dynamically responds to changes in the provider's level. If no provider is specified, defaults to the shared SIKLogLevelProvider instance.

    Index

    Constructors

    Methods

    d e f i v w

    Constructors

    Methods

    • Logs a Debug message.

      Parameters

      • message: string

        The message to log.

      Returns void

    • Logs an Error message.

      Parameters

      • message: string

        The message to log.

      Returns void

    • Throws an Error with a message for fatal conditions. The Lens will be terminated if the exception is uncaught. Unlike other logging methods, this doesn't directly write to logs but throws an exception. When uncaught, the exception and its message will be written to log upon termination.

      Parameters

      • message: string

        The message that is provided to the Exception.

      Returns void

      const TAG = "MyTag"
      const log = new NativeLogger(TAG)
      try {
      log.f("This is a fatal error condition")
      } catch (e) {
      // Handle the exception or perform cleanup
      console.log(e.message); // You could explicitly log the message if needed
      }
    • Logs an Info message.

      Parameters

      • message: string

        The message to log.

      Returns void

    • Logs a Verbose message.

      Parameters

      • message: string

        The message to log.

      Returns void

    • Logs a Warning message.

      Parameters

      • message: string

        The message to log.

      Returns void

    MMNEPVFCICPMFPCPTTAAATR