mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-29 10:41:00 +00:00
log proto with msg
Signed-off-by: Chai Nadig <chaitanya.nadig@gmail.com>
This commit is contained in:
parent
a75e588cf0
commit
4eac64eb59
1 changed files with 3 additions and 3 deletions
|
@ -65,7 +65,7 @@ func (l *StatsDUDPListener) HandlePacket(packet []byte) {
|
||||||
l.UDPPackets.Inc()
|
l.UDPPackets.Inc()
|
||||||
lines := strings.Split(string(packet), "\n")
|
lines := strings.Split(string(packet), "\n")
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
level.Debug(l.Logger).Log("msg", "Incoming line", "line", line)
|
level.Debug(l.Logger).Log("msg", "Incoming line", "proto", "udp", "line", line)
|
||||||
l.LinesReceived.Inc()
|
l.LinesReceived.Inc()
|
||||||
l.EventHandler.Queue(pkgLine.LineToEvents(line, l.SampleErrors, l.SamplesReceived, l.TagErrors, l.TagsReceived, l.Logger))
|
l.EventHandler.Queue(pkgLine.LineToEvents(line, l.SampleErrors, l.SamplesReceived, l.TagErrors, l.TagsReceived, l.Logger))
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ func (l *StatsDTCPListener) HandleConn(c *net.TCPConn) {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
level.Debug(l.Logger).Log("msg", "Incoming line", "line", line)
|
level.Debug(l.Logger).Log("msg", "Incoming line", "proto", "tcp", "line", line)
|
||||||
if isPrefix {
|
if isPrefix {
|
||||||
l.TCPLineTooLong.Inc()
|
l.TCPLineTooLong.Inc()
|
||||||
level.Debug(l.Logger).Log("msg", "Read failed: line too long", "addr", c.RemoteAddr())
|
level.Debug(l.Logger).Log("msg", "Read failed: line too long", "addr", c.RemoteAddr())
|
||||||
|
@ -170,7 +170,7 @@ func (l *StatsDUnixgramListener) HandlePacket(packet []byte) {
|
||||||
l.UnixgramPackets.Inc()
|
l.UnixgramPackets.Inc()
|
||||||
lines := strings.Split(string(packet), "\n")
|
lines := strings.Split(string(packet), "\n")
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
level.Debug(l.Logger).Log("msg", "Incoming line", "line", line)
|
level.Debug(l.Logger).Log("msg", "Incoming line", "proto", "unixgram", "line", line)
|
||||||
l.LinesReceived.Inc()
|
l.LinesReceived.Inc()
|
||||||
l.EventHandler.Queue(pkgLine.LineToEvents(line, l.SampleErrors, l.SamplesReceived, l.TagErrors, l.TagsReceived, l.Logger))
|
l.EventHandler.Queue(pkgLine.LineToEvents(line, l.SampleErrors, l.SamplesReceived, l.TagErrors, l.TagsReceived, l.Logger))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue