We are using chef for infrastructure management and deployment of various system applications.
We'd like to "duplicate" some log statements so that the message is logged to the normal chef logger, plus also log it to our chat system via curl
.
Is there an easy way to do this?
For example would something like this work
log "this is a log message" do
level :info
notifies :run, 'execute[log_to_chat]', :immediately
end
# log a message to slack via curl command
execute 'log_to_chat' do
command 'curl ....'
action :nothing
end