gopherdata / gopherdata/gophernotes

zerolog: could not write event: write |1: file already closed

Offen
#167 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
4k
Forks
264
Ø Merge
7 T. 21 Std.
Gemergte PRs (30 T.)
1

Beschreibung

I'm using zerolog in my package and when I try to use it within gophernotes, I get the following error every time it is used:
```
zerolog: could not write event: write |1: file already closed
```

The logger itself is constructed using a ConsoleWriter that writes to os.Stderr. I'm guessing that gophernotes does something to swap out os.Stderr so that it writes to the notebook rather then the terminal where it was started, but I'm not sure how to account for this in my code.
```
zerolog.New(ConsoleWriter{Out: os.Stderr})
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.