loggables

package
v0.0.0-...-8b9b725 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2019 License: MIT, MIT Imports: 5 Imported by: 32

README

go-libp2p-loggables

standard-readme compliant

logging helpers for go-libp2p

Install

go get github.com/libp2p/go-libp2p-loggables

Usage

See https://godoc.org/github.com/libp2p/go-libp2p-loggables.

Contribute

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

Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS Code of Conduct.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2016 Jeromy Johnson.

Documentation

Overview

Package loggables includes a bunch of transaltor functions for commonplace/stdlib objects. This is boilerplate code that shouldn't change much, and not sprinkled all over the place (i.e. gather it here).

Note: it may make sense to put all stdlib Loggable functions in the eventlog package. Putting it here for now in case we don't want to polute it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(e error) logging.Loggable

Error returns an eventlog.Metadata with an error

func NetConn

func NetConn(c net.Conn) logging.Loggable

NetConn returns an eventlog.Metadata with the conn addresses

func Uuid

func Uuid(key string) logging.Metadata

Types

type DeferredMap

type DeferredMap map[string]interface{}

DeferredMap is a Loggable which may contain deferred values.

func Dial

func Dial(sys string, lid, rid peer.ID, laddr, raddr ma.Multiaddr) DeferredMap

Dial metadata is metadata for dial events

func (DeferredMap) Loggable

func (m DeferredMap) Loggable() map[string]interface{}

Loggable describes objects that can be marshalled into Metadata for logging

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL