fix: add --disable-gpu flag to Chromium / chore: upgrade base image to bullseye (#331)

This commit is contained in:
Julien Neuhart
2021-08-27 09:41:59 +02:00
committed by GitHub
parent 662d3ff795
commit a5828fa01a
6 changed files with 69 additions and 8 deletions

View File

@@ -0,0 +1,31 @@
package chromium
import (
"fmt"
"io"
"go.uber.org/zap"
)
// debugLogger is wrapper around a zap.Logger which is used for debugging
// Chromium.
type debugLogger struct {
logger *zap.Logger
}
// Write logs the bytes in a debug message.
func (debug debugLogger) Write(p []byte) (n int, err error) {
debug.logger.Debug(string(p))
return len(p), nil
}
// Printf logs a debug message.
func (debug debugLogger) Printf(format string, v ...interface{}) {
debug.logger.Debug(fmt.Sprintf(format, v...))
}
// Interface guards.
var (
_ io.Writer = (*debugLogger)(nil)
)