    # File lib/chef/client.rb, line 134
        def initialize(json_attribs=nil, args={})
          @json_attribs = json_attribs
          @node = nil
          @run_status = nil
          @runner = nil
          @ohai = Ohai::System.new

          # If we want why-run output and user hasn't explicitly specified a format
          # we need to use a formatter that will render whyrun output.
          if Chef::Config.why_run
            if Chef::Config.formatter == "null"
              Chef::Log.warn("Forcing formatter of 'doc' to capture whyrun output.")
              Chef::Config[:formatter] = 'doc'
            end
          end
          formatter = Chef::Formatters.new(Chef::Config.formatter, STDOUT, STDERR)
          @events = EventDispatch::Dispatcher.new(formatter)
          @override_runlist = args.delete(:override_runlist)
          runlist_override_sanity_check!
        end