Giter VIP home page Giter VIP logo

splunk-library-javalogging's Introduction

Splunk Logging for Java

Version 1.11.7

Splunk logging for Java enables you to log events to HTTP Event Collector or to a TCP input on a Splunk Enterprise instance within your Java applications. You can use three major Java logging frameworks: Logback, Log4j 2, and java.util.logging. Splunk logging for Java is also enabled for Simple Logging Facade for Java (SLF4J).

Splunk logging for Java provides:

  • Appender classes that package events into the proper format for the input type you're using (HTTP Event Collector or TCP).

  • Handler classes that export the logging events.

  • An optional error handler to catch failures for HTTP Event Collector events.

  • Example configuration files for all three frameworks that show how to configure the frameworks to write to HTTP Event Collector or TCP ports.

  • Support for batching events (sent to HTTP Event Collector only).

Requirements

Here's what you need to get going with Splunk logging for Java.

Splunk

If you haven't already installed Splunk, download it here. For more about installing and running Splunk and system requirements, see Installing & Running Splunk. Splunk logging for Java is tested with Splunk Enterprise 8.0 and 8.2.0.

Java

You'll need Java version 8 or higher, from OpenJDK or Oracle.

Logging frameworks

If you're using the Log4j 2, Simple Logging Facade for Java (SLF4J), or Logback logging frameworks in conjunction with Splunk logging for Java there are additional compatibility requirements. For more about logging framework requirements, see Enable logging to HEC and Enable logging to TCP inputs. These frameworks require:

  • Log4j version 2.17.2
  • SLF4J version 1.7.36
  • Logback version 1.2.11

Documentation and resources

Dependency Management

The splunk-library-javalogging artifact can be accessed via Splunk's managed Maven repoitory.

Apache Maven

First define the repository as follows

...
  <repositories>
    <repository>
        <id>splunk-artifactory</id>
        <name>Splunk Releases</name>
        <url>https://splunk.jfrog.io/splunk/ext-releases-local</url>
    </repository>
  </repositories>
...

... then reference the dependency as follows

...
  <dependencies>
    <dependency>
      <groupId>com.splunk.logging</groupId>
      <artifactId>splunk-library-javalogging</artifactId>
      <version>${latest.version}</version>
    </dependency>
    ...
  </dependencies>
...

The above can be adapted to suit Other dependency management implementations as necessary.

License

Splunk logging for Java is licensed under the Apache License 2.0.

See the LICENSE file for details.

Contributions

Get the Splunk Java Logging Framework from GitHub and clone the resources to your computer. For example, use the following command:

git clone https://github.com/splunk/splunk-library-javalogging.git

Support

The Splunk logging for Java is community-supported.

  1. You can find help through our community on Splunk Answers (use the "logging-library-java" tag to identify your questions).
  2. File issues on GitHub.

splunk-library-javalogging's People

Contributors

ljiang1 avatar zenmoto avatar oizmerly avatar damiendallimore avatar rmaheshwari-splunk avatar bparmar-splunk avatar fantavlik avatar snorwin avatar vakulov avatar dan1 avatar afinkenstadt avatar pking70 avatar shakeelmohamed avatar ashah-splunk avatar vmalaviya-splunk avatar mtevenan-splunk avatar steyng avatar apruneda avatar pvanassen avatar avdv avatar kengotoda avatar stokpop avatar ncanumalla-splunk avatar tdhellmann avatar peterteunissen avatar suramvishal avatar ranma2913 avatar atoulme avatar tristan3fish avatar jihor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.