Java library

Created:
September 30, 2024
Updated:
January 7, 2025

Building the library

To build the FireTail Java Library, follow these steps:

  1. Run the Build Command: In the project’s root folder, execute the following command to build the library, excluding tests:
./gradlew build -x test

2. Publish to Maven Local: After building, publish the library to your local Maven repository with:

./gradlew publishToMavenLocal

Spring Boot configuration

To integrate the FireTail Java Library into your Spring Boot project, perform the following steps:

  1. In your build.gradle.kts file (if you are using Kotlin for build configuration), add the FireTail library dependency within the dependencies {} block:
dependencies 
{    implementation("com.github.firetail-io:firetail-java-lib:$version")}
  1. Still in your build.gradle.kts file, add the following lines below the plugins {} block:
group = "com.github.firetail-io"version = "0.0.1-SNAPSHOT"
  1. In your Spring Boot project, add application-local.yml in build/resources.

Note: Ensure there is no FIRETAIL_URL and FIRETAIL_API_KEY variables in your environment, which will override your yaml file configuration.

firetail:
  apikey: "PS-02....441b09761c3"
  url: "https://your-apiapi.logging.eu-north-west-99.sandbox.firetail.app"
  ## Cache control before dispatching logs to API
  buffer:
    # Millis
    interval: 100000
    # Max capacity
    capacity: 5