0

I see a lot of config options like jit.logging=true, and I want to watch out for things like when the jvm gives CodeCache is full. Compiler has been disabled messages, where does jruby log this stuff? Better yet, how can I tell it which file to log to? Is it just STDOUT and STDERR?

Mohamed Hafez
  • 8,621
  • 7
  • 41
  • 49

1 Answers1

1

By setting JRuby properties that affects JIT Runtime Properties ( such as: jruby.jit.logging, jruby.jit.logging, jruby.jit.logging ) you get log to standard error (commonly abbreviated stderr)

You could tell which file to log to by redirecting stderr to a specific file; for example:

jruby -J-Djruby.jit.logging=true myscript.rb  2> myfile.log

beware, however, myfile.log receives even other stderr outputs; i.e if myscript.rb executes statements such as:

$stderr.puts "print this in stderr"

you will see "print this in stderr" in myfile.log

Franco Rondini
  • 10,841
  • 8
  • 51
  • 77
  • awesome, thanks! and when i read all this stuff about the jvm writing to SystemOut.log and SystemErr.log, is that also just going to stderr and stdout? – Mohamed Hafez Mar 12 '13 at 00:28