-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1134 from wakatime/feature/backoff-debug-message
Log backoff as debug
- Loading branch information
Showing
5 changed files
with
177 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
package wakaerror | ||
|
||
// Error is a custom error interface. | ||
type Error interface { | ||
// ExitCode returns the exit code for the error. | ||
ExitCode() int | ||
// Message returns the error message. | ||
Message() string | ||
// SendDiagsOnErrors returns true when diagnostics should be sent on error. | ||
SendDiagsOnErrors() bool | ||
// ShouldLogError returns true when error should be logged. | ||
ShouldLogError() bool | ||
error | ||
} | ||
type ( | ||
// Error is a custom error interface. | ||
Error interface { | ||
// ExitCode returns the exit code for the error. | ||
ExitCode() int | ||
// Message returns the error message. | ||
Message() string | ||
// SendDiagsOnErrors returns true when diagnostics should be sent on error. | ||
SendDiagsOnErrors() bool | ||
// ShouldLogError returns true when error should be logged. | ||
ShouldLogError() bool | ||
error | ||
} | ||
|
||
// LogLevel is a custom log level interface to return log level for error. | ||
LogLevel interface { | ||
// LogLevel returns the log level for the error. | ||
LogLevel() int8 | ||
} | ||
) |