[lbry] log: support claimtrie entries
This commit is contained in:
parent
62f2be3284
commit
3f0ec0f28a
1 changed files with 7 additions and 3 deletions
10
log.go
10
log.go
|
@ -13,6 +13,7 @@ import (
|
||||||
"github.com/btcsuite/btcd/addrmgr"
|
"github.com/btcsuite/btcd/addrmgr"
|
||||||
"github.com/btcsuite/btcd/blockchain"
|
"github.com/btcsuite/btcd/blockchain"
|
||||||
"github.com/btcsuite/btcd/blockchain/indexers"
|
"github.com/btcsuite/btcd/blockchain/indexers"
|
||||||
|
"github.com/btcsuite/btcd/claimtrie/node"
|
||||||
"github.com/btcsuite/btcd/connmgr"
|
"github.com/btcsuite/btcd/connmgr"
|
||||||
"github.com/btcsuite/btcd/database"
|
"github.com/btcsuite/btcd/database"
|
||||||
"github.com/btcsuite/btcd/mempool"
|
"github.com/btcsuite/btcd/mempool"
|
||||||
|
@ -58,8 +59,9 @@ var (
|
||||||
amgrLog = backendLog.Logger("AMGR")
|
amgrLog = backendLog.Logger("AMGR")
|
||||||
cmgrLog = backendLog.Logger("CMGR")
|
cmgrLog = backendLog.Logger("CMGR")
|
||||||
bcdbLog = backendLog.Logger("BCDB")
|
bcdbLog = backendLog.Logger("BCDB")
|
||||||
btcdLog = backendLog.Logger("BTCD")
|
btcdLog = backendLog.Logger("MAIN")
|
||||||
chanLog = backendLog.Logger("CHAN")
|
chanLog = backendLog.Logger("CHAN")
|
||||||
|
lbryLog = backendLog.Logger("LBRY")
|
||||||
discLog = backendLog.Logger("DISC")
|
discLog = backendLog.Logger("DISC")
|
||||||
indxLog = backendLog.Logger("INDX")
|
indxLog = backendLog.Logger("INDX")
|
||||||
minrLog = backendLog.Logger("MINR")
|
minrLog = backendLog.Logger("MINR")
|
||||||
|
@ -77,6 +79,7 @@ func init() {
|
||||||
connmgr.UseLogger(cmgrLog)
|
connmgr.UseLogger(cmgrLog)
|
||||||
database.UseLogger(bcdbLog)
|
database.UseLogger(bcdbLog)
|
||||||
blockchain.UseLogger(chanLog)
|
blockchain.UseLogger(chanLog)
|
||||||
|
node.UseLogger(lbryLog)
|
||||||
indexers.UseLogger(indxLog)
|
indexers.UseLogger(indxLog)
|
||||||
mining.UseLogger(minrLog)
|
mining.UseLogger(minrLog)
|
||||||
cpuminer.UseLogger(minrLog)
|
cpuminer.UseLogger(minrLog)
|
||||||
|
@ -92,8 +95,9 @@ var subsystemLoggers = map[string]btclog.Logger{
|
||||||
"AMGR": amgrLog,
|
"AMGR": amgrLog,
|
||||||
"CMGR": cmgrLog,
|
"CMGR": cmgrLog,
|
||||||
"BCDB": bcdbLog,
|
"BCDB": bcdbLog,
|
||||||
"BTCD": btcdLog,
|
"MAIN": btcdLog,
|
||||||
"CHAN": chanLog,
|
"CHAN": chanLog,
|
||||||
|
"LBRY": lbryLog,
|
||||||
"DISC": discLog,
|
"DISC": discLog,
|
||||||
"INDX": indxLog,
|
"INDX": indxLog,
|
||||||
"MINR": minrLog,
|
"MINR": minrLog,
|
||||||
|
@ -115,7 +119,7 @@ func initLogRotator(logFile string) {
|
||||||
fmt.Fprintf(os.Stderr, "failed to create log directory: %v\n", err)
|
fmt.Fprintf(os.Stderr, "failed to create log directory: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
r, err := rotator.New(logFile, 10*1024, false, 3)
|
r, err := rotator.New(logFile, 40*1024, false, 3)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "failed to create file rotator: %v\n", err)
|
fmt.Fprintf(os.Stderr, "failed to create file rotator: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Reference in a new issue