-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
74 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package logmodel | ||
|
||
// | ||
// Logger | ||
// | ||
|
||
// DebugLogger is a logger emitting only debug messages. | ||
type DebugLogger interface { | ||
// Debug emits a debug message. | ||
Debug(msg string) | ||
|
||
// Debugf formats and emits a debug message. | ||
Debugf(format string, v ...interface{}) | ||
} | ||
|
||
// InfoLogger is a logger emitting debug and infor messages. | ||
type InfoLogger interface { | ||
// An InfoLogger is also a DebugLogger. | ||
DebugLogger | ||
|
||
// Info emits an informational message. | ||
Info(msg string) | ||
|
||
// Infof formats and emits an informational message. | ||
Infof(format string, v ...interface{}) | ||
} | ||
|
||
// Logger defines the common interface that a logger should have. It is | ||
// out of the box compatible with `log.Log` in `apex/log`. | ||
type Logger interface { | ||
// A Logger is also an InfoLogger. | ||
InfoLogger | ||
|
||
// Warn emits a warning message. | ||
Warn(msg string) | ||
|
||
// Warnf formats and emits a warning message. | ||
Warnf(format string, v ...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
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