Skip to content

Commit

Permalink
feat: add disable logger in config
Browse files Browse the repository at this point in the history
  • Loading branch information
rfyiamcool committed Feb 11, 2023
1 parent 1db556e commit 8f65b62
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ func New(config Config, opts *badger.Options) (*Storage, error) {
if opts.ValueDir == "" {
opts.ValueDir = fpath
}
<<<<<<< HEAD

switch config.Compression {
case "zstd":
opts.Compression = options.ZSTD
case "snappy":
opts.Compression = options.Snappy
}

=======
if config.DisableLogger {
opts.WithLogger(&nullLogger{})
}
Expand All @@ -100,7 +90,6 @@ func New(config Config, opts *badger.Options) (*Storage, error) {
opts.Compression = options.Snappy
}

>>>>>>> dd98607... feat: disable logger in config
// init storage
store := &Storage{
config: config,
Expand Down

0 comments on commit 8f65b62

Please sign in to comment.