-
Notifications
You must be signed in to change notification settings - Fork 15
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 #91 from harness/FFM-3702
FFM-3702 Adding customer logger for evaluation
- Loading branch information
Showing
5 changed files
with
103 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package logger | ||
|
||
// NoOpLogger is a type that implements the Logger interface but does nothing | ||
// when it's methods are called | ||
type NoOpLogger struct{} | ||
|
||
// NewNoOpLogger returns a NoOpLogger | ||
func NewNoOpLogger() NoOpLogger { | ||
return NoOpLogger{} | ||
} | ||
|
||
// Debug does nothing on a NoOpLogger | ||
func (m NoOpLogger) Debug(args ...interface{}) {} | ||
|
||
// Debugf does nothing on a NoOpLogger | ||
func (m NoOpLogger) Debugf(template string, args ...interface{}) {} | ||
|
||
// Info does nothing on a NoOpLogger | ||
func (m NoOpLogger) Info(args ...interface{}) {} | ||
|
||
// Infof does nothing on a NoOpLogger | ||
func (m NoOpLogger) Infof(template string, args ...interface{}) {} | ||
|
||
// Warn does nothing on a NoOpLogger | ||
func (m NoOpLogger) Warn(args ...interface{}) {} | ||
|
||
// Warnf does nothing on a NoOpLogger | ||
func (m NoOpLogger) Warnf(template string, args ...interface{}) {} | ||
|
||
// Error does nothing on a NoOpLogger | ||
func (m NoOpLogger) Error(args ...interface{}) {} | ||
|
||
// Errorf does nothing on a NoOpLogger | ||
func (m NoOpLogger) Errorf(template string, args ...interface{}) {} | ||
|
||
// Panic does nothing on a NoOpLogger | ||
func (m NoOpLogger) Panic(args ...interface{}) {} | ||
|
||
// Panicf does nothing on a NoOpLogger | ||
func (m NoOpLogger) Panicf(template string, args ...interface{}) {} | ||
|
||
// Fatal does nothing on a NoOpLogger | ||
func (m NoOpLogger) Fatal(args ...interface{}) {} | ||
|
||
// Fatalf does nothing on a NoOpLogger | ||
func (m NoOpLogger) Fatalf(template string, args ...interface{}) {} |
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