New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved event handler APIs #8043

Open
jaymzh opened this Issue Dec 13, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@jaymzh
Copy link
Member

jaymzh commented Dec 13, 2018

Describe the Enhancement:

Several fixes/additions to the event handlers would be really useful:

ohai_complete missing

:ohai_complete exists but not :ohai_start - can we get start time?

deprecation improvements

  • :deprecation requires one to do a work to format it the way Chef will. So you can't just:
on :deprecation do |dep|
  # do thing with dep.message
end

Instead you have to

on :deprecation do |dep|
  dep_warn = "#{dep.message.to_s} (CHEF-#{dep.id})#{dep.location}."
  # do thing with dep_warn
end

It'd be nice if dep had a formatted_message or some-such like exceptions have formatted_exception.

warnings

there is no :warning - we should be able to do work on warnings :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment