11var skipRegisterLogging = testing.Testing()
13// RegisterLogger should be used as parameter to bstore.Options.RegisterLogger.
15// RegisterLogger returns nil when running under test and the database file does
16// not yet exist to reduce lots of unhelpful logging, and returns logger log
18func RegisterLogger(path string, log *slog.Logger) *slog.Logger {
19 if !skipRegisterLogging {
22 if _, err := os.Stat(path); err != nil && errors.Is(err, fs.ErrNotExist) {