p
メソッドは stdout に
NSLog
メソッドは stderr に吐き出しているだけらしい。
そして Rubymotion には stdout と stderr の出力先を指定するための環境変数が用意されています。
SIM_STDOUT_PATH
SIM_STDERR_PATH
なのでこんな感じの rake
コマンドを叩くもよし
[bundle exec] rake SIM_STDOUT_PATH=/tmp/motion_stdout.log SIM_STDERR_PATH=/tmp/motion_stderr.log
Rakefile
に
Motion::Project::App.setup do |app|
・
・
ENV["SIM_STDOUT_PATH"] = "/tmp/motion_stdout.log"
ENV["SIM_STDERR_PATH"] = "/tmp/motion_stderr.log"
・
・
end
と記述するもよし。
活用例
例えばこんな感じに Jenkins の出力をいい感じにするのに使えるようです。おういえー。