Currently, SetReportCaller is a flag that can be toggled on and off.
When set to true, by default, it returns the first frame that does not belong to the Logrus package.
The request is to make this configurable. It must be possible for the user to specify the level of the frame (counting from the last Logrus package) to be returned.
Use case: I have written a wrapper over Logrus. All calls to the logger go through this wrapper. When I set SetReportCaller to true, the File Name, Function Name and Line Numbers of the Wrapper are returned.
I would like to log the File Name, Function Name and Line Numbers of the next calling function in the stack.
I'd also like to specify which log levels to add this to, I mainly only want to see the caller for errors.
Similar issue: https://github.com/sirupsen/logrus/issues/972
Related PR: https://github.com/sirupsen/logrus/pull/973
Related PR: #989
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is not stale ... there is a PR open.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is not stale ... there is a PR open.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is not stale ... there is a PR open.
8-)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is not stale ... there is a PR open.
8-)
this.
hi bots - there's still a PR open
Most helpful comment
This is not stale ... there is a PR open.