Open montanaflynn opened 5 years ago
What is your cases for change levels after hook created?
@onrik my use case is wanting to only include the filename for certain levels.
I found a pattern in other hooks that support the SetLevels
method so I assumed that was not supported but now that I looked at the code I see that NewHook
takes levels as an arg.
Maybe you could add links to godoc to help others as well:
I would like to use filename hook but only for errors, other hooks I use (logrus_sentry, logrus-papertrail-hook) expose a SetLevels method for this like so: