-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of using a standard log.Logger directly, define Logger as a function to receive the formatted log string. Add a helper (StdLogger) that adapts a standard logger to the new interface, to simplify migration of existing use. Replace: Logger: log.New(...) with: Logger: jrpc2.StdLogger(log.New(...)) to get the equivalent behaviour. The StdLogger function also accepts nil as an argument to write to the default standard log.
- Loading branch information
1 parent
120c060
commit bfa778d
Showing
4 changed files
with
51 additions
and
42 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