# class Chef::Resource::Log

### Public Class Methods

new(name, run_context=nil) click to toggle source

Initialize log resource with a name as the string to log

### Parameters¶ ↑

name<String>

  Message to log

collection<Array>

  Collection of included recipes

node<Chef::Node>

  Node where resource will be used

Calls superclass method Chef::Resource.new

    # File lib/chef/resource/log.rb, line 45
    def initialize(name, run_context=nil)
      super
      @resource_name = :log
      @level = :info
      @action = :write
      @allowed_actions.push(:write)
      @message = name
    end

### Public Instance Methods

level(arg=nil) click to toggle source

<Symbol> Log level, one of :debug, :info, :warn, :error or :fatal

    # File lib/chef/resource/log.rb, line 63
    def level(arg=nil)
      set_or_return(
        :level,
        arg,
        :equal_to => [ :debug, :info, :warn, :error, :fatal ]
      )
    end

message(arg=nil) click to toggle source

    # File lib/chef/resource/log.rb, line 54
    def message(arg=nil)
      set_or_return(
        :message,
        arg,
        :kind_of => String
      )
    end