Skip to content

Commit

Permalink
Merge pull request #81 from maoxs2/master
Browse files Browse the repository at this point in the history
Add avaliable but "Deprecated"-tagged  Warning/Warningf func for compatibility
  • Loading branch information
Stebalien committed May 4, 2020
2 parents ae9f927 + e2ce648 commit 2f9b338
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions log.go
Expand Up @@ -51,6 +51,18 @@ type ZapEventLogger struct {
system string
}

// Warning is for compatibility
// Deprecated: use Warn(args ...interface{}) instead
func (logger *ZapEventLogger) Warning(args ...interface{}) {
logger.Warn(args...)
}

// Warningf is for compatibility
// Deprecated: use Warnf(format string, args ...interface{}) instead
func (logger *ZapEventLogger) Warningf(format string, args ...interface{}) {
logger.Warnf(format, args...)
}

// FormatRFC3339 returns the given time in UTC with RFC3999Nano format.
func FormatRFC3339(t time.Time) string {
return t.UTC().Format(time.RFC3339Nano)
Expand Down

0 comments on commit 2f9b338

Please sign in to comment.