2021-08-30 18:11:06 +02:00
|
|
|
package querylog
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2022-03-03 11:27:27 +01:00
|
|
|
type LogEntry struct {
|
2022-11-26 22:12:56 +01:00
|
|
|
Start time.Time
|
|
|
|
ClientIP string
|
|
|
|
ClientNames []string
|
|
|
|
DurationMs int64
|
|
|
|
ResponseReason string
|
|
|
|
ResponseType string
|
|
|
|
ResponseCode string
|
|
|
|
QuestionType string
|
|
|
|
QuestionName string
|
|
|
|
Answer string
|
2021-08-30 18:11:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type Writer interface {
|
2022-03-03 11:27:27 +01:00
|
|
|
Write(entry *LogEntry)
|
2021-08-30 18:11:06 +02:00
|
|
|
CleanUp()
|
|
|
|
}
|