Skip to content

Instantly share code, notes, and snippets.

@bslobodin
Created March 23, 2012 14:04
Show Gist options
  • Save bslobodin/2170938 to your computer and use it in GitHub Desktop.
Save bslobodin/2170938 to your computer and use it in GitHub Desktop.
VisualWorks Splunk Integration Example 1
"Screenshots: https://www.dropbox.com/gallery/2737880/1/splunk20120323?h=37e12f"
stack := [1 / 0]
on: ZeroDivide
do: [:ex |
String streamContents: [:st |
(ErrorDumper new)
dumpStream: st;
dumpExceptionReport: ex context: ex initialContext]].
event := LogEvent
info: 'workspace_event'
with: [:ev |
(ev properties)
at: #comment put: 'this is just a sample event to test Splunk event formatting';
at: #json put: '{"url": "http://google.com"}';
at: #unicode put: 'Балалайка!'.
ev stack: stack].
(SplunkClient host: 'localhost' port: 8181) send: event.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment