Skip to content

Commit 0a2c938

Browse files
author
AJ Christensen
committed
CHEF-151: Add Chris' new log_location= overrider, mixlib-config.
1 parent 6605b7a commit 0a2c938

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

chef/lib/chef/config.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ def self.manage_secret_key
4141
newkey
4242
end
4343

44+
# Override the config dispatch to set the value of log_location configuration option
45+
#
46+
# === Parameters
47+
# location<IO||String>:: Logging location as either an IO stream or string representing log file path
48+
#
49+
def self.log_location=(location)
50+
@@configuration[:log_location]=(location.respond_to?(:sync=) ? location : File.new(location, "w+"))
51+
end
52+
4453
authorized_openid_identifiers nil
4554
cookbook_path [ "/var/chef/site-cookbooks", "/var/chef/cookbooks" ]
4655
couchdb_database "chef"

0 commit comments

Comments
 (0)