Documentation
¶
Index ¶
Constants ¶
View Source
const ( BUFFER_SIZE = 1024 SEPARATOR = ", " )
View Source
const ( SEVERITY_FATAL uint8 = 2 + iota // value as log/syslog.LOG_CRIT SEVERITY_ERROR // value as log/syslog.LOG_ERR SEVERITY_WARN // value as log/syslog.LOG_WARN SEVERITY_INFO // value as log/syslog.LOG_INFO SEVERITY_DEBUG // value as log/syslog.LOG_DEBUG SEVERITY_TRACE SEVERITY_UNKNOWN )
Variables ¶
View Source
var SeverityMap = map[string]uint8{ "FATAL": SEVERITY_FATAL, "ERROR": SEVERITY_ERROR, "WARN": SEVERITY_WARN, "INFO": SEVERITY_INFO, "DEBUG": SEVERITY_DEBUG, "TRACE": SEVERITY_TRACE, "FATAL2": SEVERITY_FATAL, "ERROR2": SEVERITY_ERROR, "WARN2": SEVERITY_WARN, "INFO2": SEVERITY_INFO, "DEBUG2": SEVERITY_DEBUG, "TRACE2": SEVERITY_TRACE, "FATAL3": SEVERITY_FATAL, "ERROR3": SEVERITY_ERROR, "WARN3": SEVERITY_WARN, "INFO3": SEVERITY_INFO, "DEBUG3": SEVERITY_DEBUG, "TRACE3": SEVERITY_TRACE, "FATAL4": SEVERITY_FATAL, "ERROR4": SEVERITY_ERROR, "WARN4": SEVERITY_WARN, "INFO4": SEVERITY_INFO, "DEBUG4": SEVERITY_DEBUG, "TRACE4": SEVERITY_TRACE, "CRITICAL": SEVERITY_FATAL, "WARNING": SEVERITY_WARN, "ERRO": SEVERITY_ERROR, "DEBU": SEVERITY_DEBUG, "FATA": SEVERITY_FATAL, "CRIT": SEVERITY_FATAL, }
Functions ¶
func StringToSeverity ¶
Types ¶
type AppLogEntry ¶
type AppLogEntry struct {
LogType string `json:"_df_log_type"`
UserID int `json:"user_id"`
OrgID int `json:"org_id"`
Kubernetes struct {
PodName string `json:"pod_name"`
PodIp string `json:"pod_ip"`
} `json:"kubernetes"`
Message string `json:"message"`
Json interface{} `json:"json"`
Level string `json:"level"`
Timestamp string `json:"timestamp"`
AppService string `json:"app_service"`
}
type Decoder ¶
func NewDecoder ¶
func NewDecoder( index int, msgType datatype.MessageType, inQueue queue.QueueReader, logWriter *dbwriter.AppLogWriter, platformData *grpc.PlatformInfoTable, config *config.Config, ) *Decoder
func (*Decoder) GetCounter ¶
func (d *Decoder) GetCounter() interface{}
func (*Decoder) WriteAppLog ¶
func (d *Decoder) WriteAppLog(agentId uint16, l *AppLogEntry) error
Click to show internal directories.
Click to hide internal directories.