{ "html": "
\n

Installation

\n

Using Maven:

\n
<dependency>\n    <groupId>io.sentry</groupId>\n    <artifactId>sentry</artifactId>\n    <version>1.6.3</version>\n</dependency>\n
\n
\n

Using Gradle:

\n
compile 'io.sentry:sentry:1.6.3'\n
\n
\n

Using SBT:

\n
libraryDependencies += "io.sentry" % "sentry" % "1.6.3"\n
\n
\n

For other dependency managers see the central Maven repository.

\n
\n\n\n
\n

Usage

\n

The following example configures a ConsoleHandler that logs to standard out\nat the INFO level and a SentryHandler that logs to the Sentry server at\nthe WARN level. The ConsoleHandler is only provided as an example of\na non-Sentry appender that is set to a different logging threshold, like one you\nmay already have in your project.

\n

Example configuration using the logging.properties format:

\n
# Enable the Console and Sentry handlers\nhandlers=java.util.logging.ConsoleHandler,io.sentry.jul.SentryHandler\n\n# Set the default log level to INFO\n.level=INFO\n\n# Override the Sentry handler log level to WARNING\nio.sentry.jul.SentryHandler.level=WARNING\n
\n
\n

When starting your application, add the java.util.logging.config.file to\nthe system properties, with the full path to the logging.properties as\nits value:

\n
$ java -Djava.util.logging.config.file=/path/to/app.properties MyClass\n
\n
\n

Next, you’ll need to configure your DSN (client key) and optionally other values such as\nenvironment and release. See the configuration page for ways you can do this.

\n
\n", "link": "https://docs.getsentry.com/clients/java/modules/jul/", "id": "java-logging", "name": "java.util.logging" }