- set ruby thread name in addition to java thread name

This commit is contained in:
Jordan Sissel 2011-04-04 01:02:04 -07:00
parent 0ecb528612
commit b3e1921169

View file

@ -2,6 +2,8 @@ require "logstash/namespace"
module LogStash::Util
def self.set_thread_name(name)
# Keep java and ruby thread names in sync.
java.lang.Thread.currentThread.setName(name)
Thread.current[:name] = name
end # def set_thread_name
end # module LogStash::Util