You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We write a comprehensive tooling for TXT and BootGuard, and we need to avoid any logs print by fiano. But fiano does not allow to do that. And here's a simple experiment:
type panicWriter struct{}
func (panicWriter) Write(b []byte) (int, error) {
panic("PANIC")
}
log.SetOutput(panicWriter{})
...
flash, err := uefi.NewFlashImage(image)
if err != nil {
return 0, 0, fmt.Errorf("count not initialize a flash image: %w", err)
}
And we need to suppress this log.Printf. The only thing we can do is log.SetOutput(ioutil.Discard), but we would like to avoid modifying a global logger.
So as a quick solution I propose to add package log to fiano and define a logger there, which will be used everywhere else within fiano. Any opinions?
The text was updated successfully, but these errors were encountered:
We write a comprehensive tooling for TXT and BootGuard, and we need to avoid any logs print by
fiano
. But fiano does not allow to do that. And here's a simple experiment:Then run it against coreboot and get:
What happens is:
uefi.NewFlashImage
.uefi.NewFlashImage
callsuefi.NewMERegion
.uefi.NewMERegion
callslog.Printf
.And we need to suppress this
log.Printf
. The only thing we can do islog.SetOutput(ioutil.Discard)
, but we would like to avoid modifying a global logger.So as a quick solution I propose to add package
log
tofiano
and define a logger there, which will be used everywhere else withinfiano
. Any opinions?The text was updated successfully, but these errors were encountered: