-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from kuttiproject/development
Add a new, special Error log level, and change some function spellings.
- Loading branch information
Showing
8 changed files
with
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/kuttiproject/kuttilog | ||
|
||
go 1.15 | ||
go 1.18 |
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,24 @@ | ||
package kuttilog | ||
|
||
// Logger contains methods for implemetation-specific logging. | ||
// Logger contains methods for implementation-specific logging. | ||
// Exact destination, formatting etc. is implementation-specific. | ||
// Kuttilog will call each print method only if needed. It will | ||
// also append a level prefix string as the first item output. | ||
// Implementations can provide their own prefix strings. | ||
// Implementations can provide their own prefix strings via the | ||
// LevelPrefix method. | ||
type Logger interface { | ||
MaxLevel() int // The maximum level permitted by this logger | ||
LevelPrefix(level int) string // The logger-supplied prefix string for a level. | ||
// MaxLevel returns the maximum level permitted by this logger. | ||
MaxLevel() int | ||
// LevelPrefix returns rhe logger-supplied prefix string for a | ||
// level. It may return an empty string. | ||
LevelPrefix(level int) string | ||
// Print prints to the log. | ||
// Arguments are handled in the manner of fmt.Print. | ||
Print(v ...interface{}) | ||
// Printf prints to the log. | ||
// Arguments are handled in the manner of fmt.Printf. | ||
Printf(format string, v ...interface{}) | ||
// Println prints to the log. | ||
// Arguments are handled in the manner of fmt.Println. | ||
Println(v ...interface{}) | ||
} |