Created
March 19, 2014 03:18
-
-
Save technosophos/9634876 to your computer and use it in GitHub Desktop.
This broke the io.Multiwriter because I had Colorizer.Write() returning the number of bytes it wrote, not the number of bytes passed into it.
This file contains hidden or 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
| package main | |
| import ( | |
| "github.com/Masterminds/cookoo" | |
| "github.com/Masterminds/cookoo/io" | |
| "os" | |
| ) | |
| func main() { | |
| _, _, cxt := cookoo.Cookoo() | |
| l := io.NewColorizer(os.Stdout) | |
| cxt.AddLogger("incolor", l) | |
| cxt.AddLogger("stdout", os.Stdout) | |
| cxt.Logf("info", "Break the logger.") | |
| } |
Author
What I was wondering was, what can you pass into cxt.Logf() that causes an error. Did you have some example that you knew broke it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Specifically, the second logger would never log anything.