Document and add support to input plugins for logging alias (#6357)
This commit is contained in:
@@ -3,7 +3,6 @@ package zipkin
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"strconv"
|
||||
@@ -60,6 +59,8 @@ type Zipkin struct {
|
||||
Port int
|
||||
Path string
|
||||
|
||||
Log telegraf.Logger
|
||||
|
||||
address string
|
||||
handler Handler
|
||||
server *http.Server
|
||||
@@ -105,7 +106,7 @@ func (z *Zipkin) Start(acc telegraf.Accumulator) error {
|
||||
}
|
||||
|
||||
z.address = ln.Addr().String()
|
||||
log.Printf("I! Started the zipkin listener on %s", z.address)
|
||||
z.Log.Infof("Started the zipkin listener on %s", z.address)
|
||||
|
||||
go func() {
|
||||
wg.Add(1)
|
||||
|
||||
@@ -562,6 +562,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
DefaultNetwork = "tcp4"
|
||||
|
||||
z := &Zipkin{
|
||||
Log: testutil.Logger{},
|
||||
Path: "/api/v1/spans",
|
||||
Port: 0,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user