generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose FTL logger through the Go SDK (#824)
@wesbillman can you let product eng know that a logger is now available please
- Loading branch information
1 parent
11cf7e1
commit 0107cc8
Showing
5 changed files
with
25 additions
and
9 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
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,16 @@ | ||
package sdk | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/TBD54566975/ftl/backend/common/log" | ||
) | ||
|
||
// Logger is a levelled printf-style logger with support for structured | ||
// attributes. | ||
type Logger = log.Logger | ||
|
||
// FromContext retrieves the current logger from the Context. | ||
func FromContext(ctx context.Context) *Logger { | ||
return log.FromContext(ctx) | ||
} |