Commit f0f325f3 authored by Jeromy Johnson's avatar Jeromy Johnson Committed by GitHub

Merge pull request #5 from geoah/master

Bring loggables up to date with go-ipfs
parents f561df4e 866badda
1.0.9: QmSVddpXhD2QziagxjdRs7eUeNypGugGxWqDsFeauv33XR
1.0.10: QmTW9nmMS1VGyr96Crz2Huu4QGwHstwL8e2VsAovLvEyeC
......@@ -12,6 +12,7 @@ import (
peer "github.com/ipfs/go-libp2p-peer"
logging "github.com/ipfs/go-log"
ma "github.com/jbenet/go-multiaddr"
uuid "github.com/satori/go.uuid"
)
// NetConn returns an eventlog.Metadata with the conn addresses
......@@ -29,6 +30,12 @@ func Error(e error) logging.Loggable {
}
}
func Uuid(key string) logging.Metadata {
return logging.Metadata{
key: uuid.NewV4().String(),
}
}
// Dial metadata is metadata for dial events
func Dial(sys string, lid, rid peer.ID, laddr, raddr ma.Multiaddr) DeferredMap {
m := DeferredMap{}
......@@ -48,7 +55,7 @@ func Dial(sys string, lid, rid peer.ID, laddr, raddr ma.Multiaddr) DeferredMap {
return m
}
// DeferredMap is a Loggable which may contained deffered values.
// DeferredMap is a Loggable which may contain deferred values.
type DeferredMap map[string]interface{}
// Loggable describes objects that can be marshalled into Metadata for logging
......
......@@ -24,11 +24,17 @@
"hash": "QmYzDkkgAEmrcNzFCiYo6L1dTX4EAG1gZkbtdbd9trL4vd",
"name": "go-multiaddr",
"version": "0.0.0"
},
{
"author": "satori",
"hash": "QmcyaFHbyiZfoX5GTpcqqCPYmbjYNAhRDekXSJPFHdYNSV",
"name": "go.uuid",
"version": "1.0.0"
}
],
"gxVersion": "0.4.0",
"language": "go",
"license": "MIT",
"name": "go-libp2p-loggables",
"version": "1.0.9"
"version": "1.0.10"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment