Commit 43b65f0e authored by anonym's avatar anonym
Browse files

Bind Java's stdout to the pseudo fifo logger after its set up.

If we do it before (which would happen if sikuli_helper.rb is loaded
by Ruby before hooks.rb) it may not be present or may contain stuff
from a previous run that doesn't belong to this run.
parent c78e6e2a
......@@ -43,9 +43,11 @@ end
# Bind Java's stdout to debug_log() via our magical pseudo fifo
# logger.
file_output_stream = Java::Io::FileOutputStream.new(DEBUG_LOG_PSEUDO_FIFO)
print_stream = Java::Io::PrintStream.new(file_output_stream)
Java::Lang::System.setOut(print_stream)
def bind_java_to_pseudo_fifo_logger
file_output_stream = Java::Io::FileOutputStream.new(DEBUG_LOG_PSEUDO_FIFO)
print_stream = Java::Io::PrintStream.new(file_output_stream)
Java::Lang::System.setOut(print_stream)
end
def findfailed_hook(pic)
STDERR.puts ""
......
......@@ -42,6 +42,8 @@ AfterConfiguration do |config|
watcher.run
end
end
# Fix Sikuli's debug_log():ing.
bind_java_to_pseudo_fifo_logger
end
# For @product tests
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment