You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
282 B

11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
  1. package p2p
  2. import (
  3. "github.com/op/go-logging"
  4. )
  5. var log = logging.MustGetLogger("p2p")
  6. func init() {
  7. logging.SetFormatter(logging.MustStringFormatter("[%{level:.1s}] %{message}"))
  8. logging.SetLevel(logging.WARNING, "p2p")
  9. }
  10. func SetP2PLogger(l *logging.Logger) {
  11. log = l
  12. }