Change BigBlueButton.execute to log error properly
This commit is contained in:
parent
cba6fef830
commit
9038522311
@ -1,5 +1,6 @@
|
||||
path = File.expand_path(File.join(File.dirname(__FILE__), '../lib'))
|
||||
$LOAD_PATH << path
|
||||
|
||||
require 'recordandplayback/audio_archiver'
|
||||
require 'recordandplayback/events_archiver'
|
||||
require 'recordandplayback/video_archiver'
|
||||
@ -12,7 +13,6 @@ require 'recordandplayback/generators/matterhorn_processor'
|
||||
require 'recordandplayback/generators/audio_processor'
|
||||
require 'recordandplayback/generators/presentation'
|
||||
|
||||
|
||||
module BigBlueButton
|
||||
class MissingDirectoryException < RuntimeError
|
||||
end
|
||||
@ -46,9 +46,13 @@ module BigBlueButton
|
||||
def self.execute(command)
|
||||
Open3.popen3(command) do | stdin, stdout, stderr|
|
||||
BigBlueButton.logger.info("Executing: #{command}")
|
||||
output = stdout.readlines
|
||||
BigBlueButton.logger.info( "Output: #{output} ") unless output.empty?
|
||||
errors = stderr.readlines
|
||||
BigBlueButton.logger.info( "Output: #{stdout.readlines} ")
|
||||
BigBlueButton.logger.info( "Error: stderr: #{errors}"); raise errors.to_s unless errors.empty?
|
||||
unless errors.empty?
|
||||
BigBlueButton.logger.error( "Error: stderr: #{errors}")
|
||||
raise errors.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user