mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
improve dateTime into event
This commit is contained in:
@ -2,6 +2,7 @@ package tracer
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Strategy func(event Event)
|
||||
@ -17,10 +18,12 @@ func Init(strategy Strategy) *Tracer {
|
||||
}
|
||||
|
||||
func (tracer *Tracer) TraceEvent(event Event) {
|
||||
event.DateTime = time.Now().UTC().String()
|
||||
tracer.strategy(event)
|
||||
}
|
||||
|
||||
type Event struct {
|
||||
DateTime string
|
||||
RemoteAddr string
|
||||
Protocol string
|
||||
Command string
|
||||
|
Reference in New Issue
Block a user