From 9184249b393e4e332ae6a2f5d774880a88a9bfd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 2 Mar 2017 15:06:16 +0200 Subject: Logger updates 3 (#3730) * accounts, cmd, eth, ethdb: port logs over to new system * ethdb: drop concept of cache distribution between dbs * eth: fix some log nitpicks to make them nicer --- accounts/url.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'accounts') diff --git a/accounts/url.go b/accounts/url.go index a2d00c1c6..47f9d8ee4 100644 --- a/accounts/url.go +++ b/accounts/url.go @@ -60,6 +60,15 @@ func (u URL) String() string { return u.Path } +// TerminalString implements the log.TerminalStringer interface. +func (u URL) TerminalString() string { + url := u.String() + if len(url) > 32 { + return url[:31] + "…" + } + return url +} + // MarshalJSON implements the json.Marshaller interface. func (u URL) MarshalJSON() ([]byte, error) { return json.Marshal(u.String()) -- cgit v1.2.3