Class NativeLog

java.lang.Object
uk.co.caprica.vlcj.log.NativeLog

public final class NativeLog extends Object
Encapsulation of the vlc native log.

The native library specifies that implementations of native log handlers (like that encapsulated within this class) must be thread-safe.

The default log level is LogLevel.NOTICE, this can be changed by invoking setLevel(LogLevel).

  • Constructor Details

    • NativeLog

      public NativeLog(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t instance)
      Create a new native log component.
      Parameters:
      instance - libvlc instance
  • Method Details

    • addLogListener

      public final void addLogListener(LogEventListener listener)
      Add a component to be notified of log messages.
      Parameters:
      listener - component to add
    • removeLogListener

      public final void removeLogListener(LogEventListener listener)
      Remove a component previously added so it is no longer notified of log messages.
      Parameters:
      listener - component to remove
    • setLevel

      public final void setLevel(LogLevel logLevel)
      Set the log threshold level.

      Only log messages that are equal to or exceed this threshold are notified to listeners.

      Parameters:
      logLevel - log threshold level
    • getLevel

      public final LogLevel getLevel()
      Get the log threshold level.
      Returns:
      level
    • release

      public final void release()
      Release the native log component.