ipfs-cluster/logging.go
Hector Sanjuan 2bbbea79cc Issue #49: Add disk informer
The disk informer uses "ipfs repo stat" to fetch the RepoSize value and
uses it as a metric.

The numpinalloc allocator is now a generalized ascendalloc which
sorts metrics in ascending order and return the ones with lowest
values.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-27 20:40:49 +02:00

31 lines
452 B
Go

package ipfscluster
import logging "github.com/ipfs/go-log"
var logger = logging.Logger("cluster")
var facilities = []string{
"cluster",
"restapi",
"ipfshttp",
"monitor",
"consensus",
"raft",
"pintracker",
"ascendalloc",
"diskinfo",
}
// SetFacilityLogLevel sets the log level for a given module
func SetFacilityLogLevel(f, l string) {
/*
CRITICAL Level = iota
ERROR
WARNING
NOTICE
INFO
DEBUG
*/
logging.SetLogLevel(f, l)
}