Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterLogWriter ¶
func RegisterLogWriter(logtype string, creator LogCreator)
Types ¶
type LogCreator ¶
type LogCreator func(string, int) (UserLogFile, error)
type UserLog ¶
type UserLog struct { Created time.Time `json:"ts"` RequestID string `json:"rid"` FunctionBrn string `json:"brn,omitempty"` TriggerType string `json:"triggerType,omitempty"` RuntimeID string `json:"runtimeID,omitempty"` FuncName string `json:"func,omitempty"` Version string `json:"version,omitempty"` UserID string `json:"userid,omitempty"` Source string `json:"src"` Message []byte `json:"msg"` InvocationTime int64 `json:"invocationTime,omitempty"` MemoryUsage int64 `json:"memoryUsage,omitempty"` Mode string `json:"invokeMode, omitempty"` ResponseStatus int `json:"responseStatus, omitempty"` }
UserLog marshals encoded JSONLog objects
func (*UserLog) MarshalJSONBuf ¶
MarshalJSONBuf is an optimized JSON marshaller that avoids reflection and unnecessary allocation.
type UserLogFile ¶
func CreateLogWriter ¶
func CreateLogWriter(logtype string, fpath string, cap int) (UserLogFile, error)
Click to show internal directories.
Click to hide internal directories.