add environment variables to turn on the debug log without recompiling
This commit is contained in:
parent
60dd97c7fc
commit
b6611125b6
@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"os"
|
||||
"sort"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
@ -149,6 +150,16 @@ type SplitStore struct {
|
||||
|
||||
var _ bstore.Blockstore = (*SplitStore)(nil)
|
||||
|
||||
func init() {
|
||||
if os.Getenv("LOTUS_SPLITSTORE_DEBUG_LOG") == "1" {
|
||||
enableDebugLog = true
|
||||
}
|
||||
|
||||
if os.Getenv("LOTUS_SPLITSTORE_DEBUG_LOG_WRITE_TRACES") == "1" {
|
||||
enableDebugLogWriteTraces = true
|
||||
}
|
||||
}
|
||||
|
||||
// Open opens an existing splistore, or creates a new splitstore. The splitstore
|
||||
// is backed by the provided hot and cold stores. The returned SplitStore MUST be
|
||||
// attached to the ChainStore with Start in order to trigger compaction.
|
||||
|
Loading…
Reference in New Issue
Block a user