go-metrics icon indicating copy to clipboard operation
go-metrics copied to clipboard

add a function to log in a compact format

Open Dieterbe opened this issue 11 years ago • 3 comments
trafficstars

a more compact display of 1 line per metric, and all times in ms.

with Log() the output was super overwhelming to me.

Dieterbe avatar Oct 02 '14 19:10 Dieterbe

Any reason not to use the same format as in syslog.go?

rcrowley avatar Oct 05 '14 00:10 rcrowley

whoa, i hadn't seen syslog.go; looks very similar indeed. however syslog.go:

  • it still seems to use nanoseconds, which makes the numbers very big and hard to read if the number is in the order of tens or hundreds of ms
  • it includes every single dimension/percentile, which is also too much info for my case.

then again the format in this PR will often also not be exactly what people want. maybe we should make it easier for people to dynamically build a log function that logs in the format they want.

Dieterbe avatar Oct 08 '14 13:10 Dieterbe

Wonder if a MetricFormatter interface needs to be introduced with a default implementation using text/template

mihasya avatar Jul 04 '15 20:07 mihasya