Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = NewUHCLogger(context.Background())
Logger is a logger with a background context
Functions ¶
func GetOperationID ¶
GetOperationID get operationID of the context
func OperationIDMiddleware ¶
Middleware wraps the given HTTP handler so that the details of the request are sent to the log.
Types ¶
type LoggerKeys ¶
type LoggerKeys string
const ( ActionKey LoggerKeys = "Action" ActionResultKey LoggerKeys = "EventResult" RemoteAddrKey LoggerKeys = "RemoteAddr" ActionFailed LoggerKeys = "failed" ActionSuccess LoggerKeys = "success" )
type OperationIDKey ¶
type OperationIDKey string
const OpIDHeader OperationIDKey = "X-Operation-ID"
const OpIDKey OperationIDKey = "opID"
type UHCLogger ¶
type UHCLogger interface { V(level int32) UHCLogger Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Error(err error) Fatalf(format string, args ...interface{}) }
func NewUHCLogger ¶
NewUHCLogger creates a new logger instance with a default verbosity of 1
Click to show internal directories.
Click to hide internal directories.