Backend: Error Monitoring
Go
Java
JS
Python
Ruby
Rust
Backend: Logging
Go
JS
Python
Ruby
Java
Rust
Hosting Providers
Backend: Tracing
Go
Node.js
Python
Rust
Native OpenTelemetry
Fullstack Frameworks
Overview
Self Host & Local Dev
Menu
Logging in Java Quick Start
Learn how to set up highlight.io Java log ingestion.
1
Set up your frontend highlight.io integration.
First, make sure you've followed the frontend getting started guide.
2
Install the Highlight Java SDK.
Add Highlight to your maven pom file.
<dependency>
<groupId>io.highlight</groupId>
<artifactId>highlight-sdk</artifactId>
<version>latest</version>
</dependency>
3
Initialize the Highlight Java SDK.
Highlight.init()
initializes the Highlight backend SDK.
HighlightOptions options = HighlightOptions.builder("<YOUR_PROJECT_ID>")
.version("1.0.0")
.environment("development")
.build();
Highlight.init(options);
4
Set up and call the Highlight Logger.
Highlight.captureLog() will record and send logs to Highlight.
Highlight.captureLog(Severity.INFO, "Just another message");
5
Set up and call the Highlight custom records.
Highlight.captureRecord() will send custom defined logs to Highlight.
Highlight.captureRecord(HighlightRecord.log()
.severity(Severity.warn("Internal", Priority.HIGH))
.message("Just another message")
.requestId("REQUEST_ID")
.attributes(attributes -> attributes.put("application.user.name", "NgLoader"))
.build());
6
Verify your backend logs are being recorded.
Visit the highlight logs portal and check that backend logs are coming in.