Class SentryBootstrap


  • public final class SentryBootstrap
    extends Object
    A class adding a configured SentryAppender to the root logger.
    • Method Detail

      • bootstrap

        public static void bootstrap​(String dsn)
        Bootstrap the SLF4J root logger with a configured SentryAppender.
        Parameters:
        dsn - The DSN (Data Source Name) for your project
      • bootstrap

        public static void bootstrap​(String dsn,
                                     boolean cleanRootLogger)
        Bootstrap the SLF4J root logger with a configured SentryAppender.
        Parameters:
        dsn - The DSN (Data Source Name) for your project
        cleanRootLogger - If true, detach and stop all other appenders from the root logger
      • bootstrap

        public static void bootstrap​(String dsn,
                                     String environment,
                                     String release,
                                     boolean cleanRootLogger)
        Bootstrap the SLF4J root logger with a configured SentryAppender.
        Parameters:
        dsn - The DSN (Data Source Name) for your project
        environment - The environment name to pass to Sentry
        release - The release name to pass to Sentry
        cleanRootLogger - If true, detach and stop all other appenders from the root logger
      • bootstrap

        public static void bootstrap​(String dsn,
                                     String environment,
                                     String release,
                                     String serverName,
                                     boolean cleanRootLogger)
        Bootstrap the SLF4J root logger with a configured SentryAppender.
        Parameters:
        dsn - The DSN (Data Source Name) for your project
        environment - The environment name to pass to Sentry
        release - The release name to pass to Sentry
        serverName - The server name to pass to Sentry
        cleanRootLogger - If true, detach and stop all other appenders from the root logger
      • bootstrap

        public static void bootstrap​(String dsn,
                                     String threshold,
                                     String environment,
                                     String release,
                                     String serverName,
                                     boolean cleanRootLogger)
        Bootstrap the SLF4J root logger with a configured SentryAppender.
        Parameters:
        dsn - The DSN (Data Source Name) for your project
        threshold - log events threshold
        environment - The environment name to pass to Sentry
        release - The release name to pass to Sentry
        serverName - The server name to pass to Sentry
        cleanRootLogger - If true, detach and stop all other appenders from the root logger