status-go/vendor/github.com/ipfs/go-log/v2
RichΛrd 40359f9c1b
go-waku integration (#2247)
* Adding wakunode module
* Adding wakuv2 fleet files
* Add waku fleets to update-fleet-config script
* Adding config items for waku v2
* Conditionally start waku v2 node depending on config
* Adapting common code to use go-waku
* Setting log level to info
* update dependencies
* update fleet config to use WakuNodes instead of BootNodes
* send and receive messages
* use hash returned when publishing a message
* add waku store protocol
* trigger signal after receiving store messages
* exclude linting rule SA1019 to check deprecated packages
2021-06-16 16:19:45 -04:00
..
LICENSE go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
README.md go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
core.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
go.mod go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
go.sum go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
levels.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
log.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
package.json go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
path_other.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
path_windows.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
pipe.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
setup.go go-waku integration (#2247) 2021-06-16 16:19:45 -04:00

README.md

go-log

standard-readme compliant GoDoc Build Status

The logging library used by go-ipfs

go-log wraps zap to provide a logging facade. go-log manages logging instances and allows for their levels to be controlled individually.

Install

go get github.com/ipfs/go-log

Usage

Once the package is imported under the name logging, an instance of EventLogger can be created like so:

var log = logging.Logger("subsystem name")

It can then be used to emit log messages in plain printf-style messages at seven standard levels:

Levels may be set for all loggers:

lvl, err := logging.LevelFromString("error")
  if err != nil {
    panic(err)
  }
logging.SetAllLoggers(lvl)

or individually:

lvl, err := logging.LevelFromString("error")
  if err != nil {
    panic(err)
  }
logging.SetLogLevel("foo", "info")

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

Want to hack on IPFS?

License

MIT