Skip to content

Instantly share code, notes, and snippets.

@mnem
Created October 7, 2014 10:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mnem/2540fece4ed9d3403b98 to your computer and use it in GitHub Desktop.
Save mnem/2540fece4ed9d3403b98 to your computer and use it in GitHub Desktop.
Preventing mkmf littering with log files
require 'mkmf'
# Make the MakeMakefile logger write file output to null.
# Probably requires ruby >= 1.9.3
module MakeMakefile::Logging
@logfile = File::NULL
end
@NARKOZ
Copy link

NARKOZ commented May 5, 2015

# for ruby < 2.0
module Logging
  @logfile = File::NULL
end

@ethicalhack3r
Copy link

Thanks for this! Is there any way to prevent checking for ls... yes from STDOUT?

@tanadeau
Copy link

To stop the "checking for", add @quiet = true to the above module.

@orgads
Copy link

orgads commented Jun 15, 2021

Easier:

MakeMakefile::Logging.quiet = true

@Zmakerzz
Copy link

HELP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment