When debug is enabled, all loggers set report caller to true #2631
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is only to improve debugging visibility by enabling logrus
SetReportCaller
when the logger is set to debug level (verbose) - Bear in mind that because there's a specific formatter when in text mode, the report caller fields will only be visible in all loggers when the JSON logger is enabled too.Why this change
This change is a side effect of #2609 in which @ChristopherHX challenged that the error of not showing why this is happening belongs to Gitea Act runner and not Nektos Act. I think he's right, but because of how thin the logging is it is tough to understand where the error is being reported, hence I introduced this change (disabled by default in normal operations) to simplify the work of debugging by dumping which line is the one called when something is being logged.
Logs look like this when this is enabled:
Then
Greatly simplifying following what is being called when from where.