Skip to content

Commit

Permalink
fix(logging): update logs to include the correct procname
Browse files Browse the repository at this point in the history
Refs: ARC-9901
  • Loading branch information
bajankristof committed Nov 28, 2024
1 parent 92471a6 commit 1389cdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ffmpeg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def ffmpeg_binary
#
# @return [Array] The standard output, the standard error, and the process status.
def ffmpeg_capture3(*args)
FFMPEG.logger.debug(self.class) { "ffmpeg -y #{args.join(' ')}" }
logger.debug(self) { "ffmpeg -y #{args.join(' ')}" }
stdout, stderr, status = Open3.capture3(ffmpeg_binary, '-y', *args)
FFMPEG::IO.encode!(stdout)
FFMPEG::IO.encode!(stderr)
Expand All @@ -111,7 +111,7 @@ def ffmpeg_capture3(*args)
# @yieldparam wait_thr (+Thread+) The child process thread.
# @return [void]
def ffmpeg_popen3(*args, &block)
FFMPEG.logger.debug(self.class) { "ffmpeg -y #{args.join(' ')}" }
logger.debug(self) { "ffmpeg -y #{args.join(' ')}" }
Open3.popen3(ffmpeg_binary, '-y', *args) do |stdin, stdout, stderr, wait_thr|
block.call(stdin, FFMPEG::IO.new(stdout), FFMPEG::IO.new(stderr), wait_thr)
rescue StandardError
Expand Down Expand Up @@ -170,7 +170,7 @@ def ffprobe_binary=(path)
# @return [Array] The standard output, the standard error, and the process status.
# @raise [Errno::ENOENT] If the ffprobe binary cannot be found.
def ffprobe_capture3(*args)
FFMPEG.logger.debug(self.class) { "ffprobe -y #{args.join(' ')}" }
logger.debug(self) { "ffprobe -y #{args.join(' ')}" }
stdout, stderr, status = Open3.capture3(ffprobe_binary, '-y', *args)
FFMPEG::IO.encode!(stdout)
FFMPEG::IO.encode!(stderr)
Expand All @@ -188,7 +188,7 @@ def ffprobe_capture3(*args)
# @return [void]
# @raise [Errno::ENOENT] If the ffprobe binary cannot be found.
def ffprobe_popen3(*args, &block)
FFMPEG.logger.debug(self.class) { "ffprobe -y #{args.join(' ')}" }
logger.debug(self) { "ffprobe -y #{args.join(' ')}" }
Open3.popen3(ffprobe_binary, '-y', *args) do |stdin, stdout, stderr, wait_thr|
block.call(stdin, FFMPEG::IO.new(stdout), FFMPEG::IO.new(stderr), wait_thr)
rescue StandardError
Expand Down

0 comments on commit 1389cdb

Please sign in to comment.