All Projects → splunk → Splunk Library Javalogging

splunk / Splunk Library Javalogging

Licence: apache-2.0
Splunk logging appenders for popular Java Logging frameworks

Programming Languages

java
68154 projects - #9 most used programming language

Splunk Logging for Java

Version 1.8.0

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 7.0 and 7.2.

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.12.1
  • SLF4J version 1.7.29
  • Logback version 1.2.3

Documentation and resources

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.

Contact us

You can contact support if you have Splunk related questions.

You can reach the Dev Platform team at [email protected].

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].