Hi,
The field attribute of log_forward is defined like this:
attribute :fields, kind_of: Hash, default: {}, required: true
And I’m trying to pass a hash value:
log_forward 'logback-bo-batch' do
paths ['/var/log/urms/cgp.bo-batch.log']
fields {
'type' => 'logback',
'component' => 'bo-batch',
'environment' => node.chef_environment
}
end
At compilation it says it expects ‘}’ istead of ‘=>’ (at the first => in ‘type’ => ‘logback’)
It does not matter what I change it just does not get the hash
I read once something with chef hash and ruby hash, is there a difference?
Did I use a wrong hash and how does the hash to use look like?
Thanks for any help!!