-
Notifications
You must be signed in to change notification settings - Fork 72
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
Move all audit logging to templates #1709
Conversation
86a718e
to
751fa5b
Compare
lib/nerves_hub/devices.ex
Outdated
@@ -1091,6 +1070,7 @@ defmodule NervesHub.Devices do | |||
{:ok, updated} | |||
|
|||
err -> | |||
Logger.warning("Could not move device: #{inspect(err)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this be logged to sentry as well? @joshk
751fa5b
to
ca603f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you!
4157586
to
e4ef887
Compare
This reverts commit ca603f7.
Add moduledocs and function specs.
3d8e541
to
0ee4737
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOVE LOVE LOVE THIS PR
THE CONSISTENCY IS FANTASTIC, THE ENCAPSULATION, THE CLEANING
Thank you!
Moves all audit logging to the template module.
One exception is in the function
Devices.update_device_with_audit/4
where the audit log description is passed via the updating action (liketag_device
for example). I don't know if it's worth it adding this to templates, since the templates themselves (the description) are defined outside the templates module. Any input on this is welcomed!