Skip to content

Instantly share code, notes, and snippets.

@tobowers
Created July 19, 2012 19:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobowers/3146102 to your computer and use it in GitHub Desktop.
Save tobowers/3146102 to your computer and use it in GitHub Desktop.
require 'syslog'
require 'java'
s = Syslog.open('test')
s.err("this is tagged [test]")
c = org.jruby.embed.ScriptingContainer.new(org.jruby.embed.LocalContextScope::SINGLETHREAD)
c.run_scriptlet("require 'syslog'")
c.run_scriptlet("s2 = Syslog.open('inside')")
s.err("this is tagged [inside]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment