Skip to content

Commit

Permalink
Write to logger instead of stderr directly
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Jan 3, 2024
1 parent f4fd002 commit 5be8b84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ruby_wasm/cli.rb
Expand Up @@ -173,13 +173,13 @@ def do_print_ruby_cache_key(packager)

def do_build(executor, tmpdir, packager, options)
wasm_bytes = packager.package(executor, tmpdir, options)
@stderr.puts "Size: #{SizeFormatter.format(wasm_bytes.size)}"
RubyWasm.logger.info "Size: #{SizeFormatter.format(wasm_bytes.size)}"
case options[:output]
when "-"
@stdout.write wasm_bytes.pack("C*")
else
File.binwrite(options[:output], wasm_bytes.pack("C*"))
@stderr.puts "Wrote #{options[:output]}"
RubyWasm.logger.debug "Wrote #{options[:output]}"
end
end
end
Expand Down

0 comments on commit 5be8b84

Please sign in to comment.