lib/flashplayer/log_file.rb in flashplayer-10.1.6.pre vs lib/flashplayer/log_file.rb in flashplayer-10.1.7.pre

- old
+ new

@@ -7,11 +7,11 @@ def initialize @logger = $stdout end - def tail thread + def tail thread=nil tail_path flashlog_path, thread end private @@ -21,11 +21,11 @@ clear_flashlog_at path read_flashlog_at path, thread end def read_flashlog_at path, thread=nil - thread ||= Thread.new{} + thread ||= fake_thread lines_put = 0 trap("INT") { thread.kill } while thread.alive? do @@ -72,13 +72,24 @@ FileUtils.makedirs(File.dirname(path)) FileUtils.touch(path) end end + def fake_thread + Thread.new do + while true + sleep(0.2) + end + end + end + end end -desc "Tail the flashlog.txt and block" -task :flashlog do - reader = FlashPlayer::LogFile.new - reader.tail -end +#desc "Tail the flashlog.txt and block" +#task :flashlog do + #mm_config = FlashPlayer::MMConfig.new + #mm_config.create + #reader = FlashPlayer::LogFile.new + #reader.tail +#end +