Commit 08af98d4 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

logging friendliness

parent 5d9b1f8b
...@@ -65,7 +65,7 @@ type Peer struct { ...@@ -65,7 +65,7 @@ type Peer struct {
// String prints out the peer. // String prints out the peer.
func (p *Peer) String() string { func (p *Peer) String() string {
return "[Peer " + p.ID.String() + "]" return "[Peer " + p.ID.String()[:12] + "]"
} }
// Key returns the ID as a Key (string) for maps. // Key returns the ID as a Key (string) for maps.
......
...@@ -18,7 +18,7 @@ var ansiGray = "\033[0;37m" ...@@ -18,7 +18,7 @@ var ansiGray = "\033[0;37m"
// LogFormats is a map of formats used for our logger, keyed by name. // LogFormats is a map of formats used for our logger, keyed by name.
var LogFormats = map[string]string{ var LogFormats = map[string]string{
"default": "%{color}%{time:2006-01-02 15:04:05.999999} %{level} %{shortfile}: %{color:reset}%{message}", "default": "%{color}%{time:2006-01-02 15:04:05.999999} %{level} %{shortfile}: %{color:reset}%{message}",
"color": ansiGray + "%{time:15:04:05.999} %{color}%{level} " + ansiGray + "%{shortfile}: %{color:reset}%{message}", "color": ansiGray + "%{time:15:04:05.999} %{color}%{level}: %{color:reset}%{message} " + ansiGray + "%{shortfile}%{color:reset}",
} }
// Logging environment variables // Logging environment variables
......
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