How to mask output logging in Knife.rb file

60 Views Asked by At
log_level                :info
log_location             STDOUT
node_name                "test"
client_key               "C:/Python27/Lib/site"
validation_key           "/nonexist"
chef_server_url          ""

I've got knife.rb file which is exposing the client key to the output and i want the logging to stop to prevent this. Is there any way I can set this log location to NULL?

1

There are 1 best solutions below

0
Mr. On

as you can see, you are using STDOUT ruby predefined global variable, switching it with File::NULL may do the trick.

here is an untested example

log_location    File.open(File::NULL, "w")