Package io.sentry.jul

Class SentryHandler


  • public class SentryHandler
    extends java.util.logging.Handler
    Logging handler in charge of sending the java.util.logging records to a Sentry server.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String THREAD_ID
      Name of the SentryEvent extra property containing the Thread id.
    • Constructor Summary

      Constructors 
      Constructor Description
      SentryHandler()
      Creates an instance of SentryHandler.
      SentryHandler​(@NotNull io.sentry.SentryOptions options)
      Creates an instance of SentryHandler.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void flush()  
      @NotNull java.util.logging.Level getMinimumBreadcrumbLevel()  
      @NotNull java.util.logging.Level getMinimumEventLevel()  
      boolean isPrintfStyle()  
      void publish​(@NotNull java.util.logging.LogRecord record)  
      void setMinimumBreadcrumbLevel​(@Nullable java.util.logging.Level minimumBreadcrumbLevel)  
      void setMinimumEventLevel​(@Nullable java.util.logging.Level minimumEventLevel)  
      void setPrintfStyle​(boolean printfStyle)  
      • Methods inherited from class java.util.logging.Handler

        getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
      • Methods inherited from class java.lang.Object

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

      • THREAD_ID

        public static final java.lang.String THREAD_ID
        Name of the SentryEvent extra property containing the Thread id.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SentryHandler

        public SentryHandler()
        Creates an instance of SentryHandler.
      • SentryHandler

        public SentryHandler​(@NotNull
                             @NotNull io.sentry.SentryOptions options)
        Creates an instance of SentryHandler.
        Parameters:
        options - the SentryOptions
    • Method Detail

      • publish

        public void publish​(@NotNull
                            @NotNull java.util.logging.LogRecord record)
        Specified by:
        publish in class java.util.logging.Handler
      • flush

        public void flush()
        Specified by:
        flush in class java.util.logging.Handler
      • close

        public void close()
                   throws java.lang.SecurityException
        Specified by:
        close in class java.util.logging.Handler
        Throws:
        java.lang.SecurityException
      • setPrintfStyle

        public void setPrintfStyle​(boolean printfStyle)
      • setMinimumBreadcrumbLevel

        public void setMinimumBreadcrumbLevel​(@Nullable
                                              @Nullable java.util.logging.Level minimumBreadcrumbLevel)
      • getMinimumBreadcrumbLevel

        @NotNull
        public @NotNull java.util.logging.Level getMinimumBreadcrumbLevel()
      • setMinimumEventLevel

        public void setMinimumEventLevel​(@Nullable
                                         @Nullable java.util.logging.Level minimumEventLevel)
      • getMinimumEventLevel

        @NotNull
        public @NotNull java.util.logging.Level getMinimumEventLevel()
      • isPrintfStyle

        public boolean isPrintfStyle()