-
Notifications
You must be signed in to change notification settings - Fork 2
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 #61 from skit-ai/slog-interface
Slog Interface
- Loading branch information
Showing
2 changed files
with
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package slog | ||
|
||
import "context" | ||
|
||
// Logger represents the methods supported by slog | ||
type Logger interface { | ||
Info(msg string, args ...any) | ||
Warn(msg string, args ...any) | ||
Debug(msg string, args ...any) | ||
Error(err error, msg string, args ...any) | ||
Infof(format string, args ...any) | ||
Warnf(format string, args ...any) | ||
Debugf(format string, args ...any) | ||
Errorf(err error, format string, args ...any) | ||
WithTraceId(ctx context.Context) Logger | ||
WithFields(fields map[string]any) Logger | ||
} |