github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/countlog/spi.go (about)

     1  package countlog
     2  
     3  import (
     4  	"os"
     5  	"github.com/v2pro/plz/countlog/output"
     6  	"github.com/v2pro/plz/countlog/stats"
     7  	"github.com/v2pro/plz/countlog/output/hrf"
     8  	"github.com/v2pro/plz/countlog/spi"
     9  )
    10  
    11  var EventWriter spi.EventSink = output.NewEventWriter(output.EventWriterConfig{
    12  	Format: &hrf.Format{},
    13  	Writer: os.Stdout,
    14  })
    15  
    16  var EventAggregator spi.EventSink = stats.NewEventAggregator(stats.EventAggregatorConfig{
    17  	Collector: nil, // set Collector to enable stats
    18  })