-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added recovery in crons recovery (#4592)
* crons recovery * renaming * wire external * changes
- Loading branch information
1 parent
3636243
commit ed7dc4f
Showing
12 changed files
with
64 additions
and
40 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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cron | ||
|
||
import ( | ||
"github.com/devtron-labs/common-lib/constants" | ||
"go.uber.org/zap" | ||
) | ||
|
||
type CronLoggerImpl struct { | ||
logger *zap.SugaredLogger | ||
} | ||
|
||
func (impl *CronLoggerImpl) Info(msg string, keysAndValues ...interface{}) { | ||
impl.logger.Infow(msg, keysAndValues...) | ||
} | ||
|
||
func (impl *CronLoggerImpl) Error(err error, msg string, keysAndValues ...interface{}) { | ||
keysAndValues = append([]interface{}{"err", err}, keysAndValues...) | ||
impl.logger.Errorw(constants.PanicLogIdentifier+": "+msg, keysAndValues...) | ||
} | ||
|
||
func NewCronLoggerImpl(logger *zap.SugaredLogger) *CronLoggerImpl { | ||
return &CronLoggerImpl{logger: logger} | ||
} |
Oops, something went wrong.