+ All Categories
Home > Technology > Splunk Java Logging

Splunk Java Logging

Date post: 27-Jan-2015
Category:
Upload: damien-dallimore
View: 115 times
Download: 0 times
Share this document with a friend
Description:
Presentation section from Splunk Live content
Popular Tags:
10
SplunkJavaLoggi ng Damien Dallimore Developer Evangelist
Transcript
Page 1: Splunk Java Logging

SplunkJavaLogging

Damien DallimoreDeveloper Evangelist

Page 2: Splunk Java Logging

Copyright © 2013, Splunk Inc.2

Background• Sometimes you can’t deploy a Splunk Forwarder to collect logs,

although this is certainly a best practice

• Sometimes you have disk constraints for writing logs

• Wouldn’t it be nice to send your log events from your code directly to Splunk ?

• Sure , Splunk can eat any text logs , but we should be educating our developers about the value in best practice semantic logging

Page 3: Splunk Java Logging

Copyright © 2013, Splunk Inc.

SplunkJavaLogging

3

• A logging framework to allow developers to as seamlessly as possible integrate Splunk best practice logging semantics into their code

• Transport log events to Splunk directly from your code• Custom handler/appender implementations(REST and Raw TCP) for common

Java logging frameworks . • LogBack• Log4j (Log4j2 coming also)• java.util.logging

• Utility classes for formatting log events• Configurable in memory buffer to handle network outages

Page 4: Splunk Java Logging

Copyright © 2013, Splunk Inc.

Developers just log as they are used to

4

2012-08-07 15:54:06:644+1200 name="Failed Login" event_id="someID" app="myapp" user="jane" somefieldname="foobar"

Better

A-HA

Page 5: Splunk Java Logging

Copyright © 2013, Splunk Inc.

Logging Framework takes care of the Splunk transport , REST or Raw TCP

5

Page 6: Splunk Java Logging

Copyright © 2013, Splunk Inc.

<barf>Typical Java Stacktraces in logs</barf>

6

Page 7: Splunk Java Logging

Copyright © 2013, Splunk Inc.

SplunkJavaLogging is your friend

7

Page 8: Splunk Java Logging

Copyright © 2013, Splunk Inc.

Java Stacktraces in Splunk

8

Page 9: Splunk Java Logging

Demo

Page 10: Splunk Java Logging

Copyright © 2013, Splunk Inc.10

Contact me

Email : [email protected] : @damiendallimoreSkype : damien.dallimoreGithub : damiendallimoreSplunkbase : damiendSlideshare : http://www.slideshare.net/damiendallimore Blogs : http://blogs.splunk.com/devWeb : http://dev.splunk.com


Recommended