Documentation
¶
Index ¶
- Constants
- func Action(req *restful.Request, action string)
- func AdditionalFields(req *restful.Request, fields map[string]interface{})
- func Debug(req *restful.Request, eventID int, eventType int, eventLevel int, msg string)
- func Error(req *restful.Request, eventID int, eventType int, eventLevel int, msg string)
- func Fatal(req *restful.Request, eventID int, eventType int, eventLevel int, msg string)
- func Info(req *restful.Request, eventID int, eventType int, eventLevel int, msg string)
- func Log(realm string, service string, fn extractAttribute) restful.FilterFunction
- func TargetUser(req *restful.Request, id, namespace string)
- func Topic(req *restful.Request, topic string)
- func Warn(req *restful.Request, eventID int, eventType int, eventLevel int, msg string)
- type UTCFormatter
Constants ¶
View Source
const ( // TraceIDKey is the X-Ab-TraceID request header. // // Deprecated: X-Ab-TraceID is being replaced by the OpenTelemetry trace ID, which logs // write in the trace_id field. To read a request's trace ID, use util.ExtractDefault or the // span in req.Request.Context(). There is no replacement request header: callers receive the // trace ID in the X-Trace-Id response header that log.AccessLog sets, and continue a trace // with traceparent. TraceIDKey = "X-Ab-TraceID" // SessionIDKey is the X-Ab-SessionID request header. // // Deprecated: use constant.SessionID from pkg/constant. SessionIDKey = "X-Ab-SessionID" // FlightIDKey is the x-flight-id request header. // // Deprecated: use constant.FlightID from pkg/constant. FlightIDKey = "x-flight-id" )
Variables ¶
This section is empty.
Functions ¶
func AdditionalFields ¶
AdditionalFields injects additional log fields to the event in the request
func Log ¶
func Log(realm string, service string, fn extractAttribute) restful.FilterFunction
Log is a filter that will log incoming request with AccelByte's Event Log Format. fn extracts the actor, trace, session and flight IDs for the event line; with a nil fn, they are left empty.
func TargetUser ¶
TargetUser injects the target user ID and namespace to current event in the request
Types ¶
Click to show internal directories.
Click to hide internal directories.