logging

package
v0.0.0-...-9750751 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CalMsgTypeDb             string = "DB"
	CalMsgTypePing           string = "PING"
	CalMsgTypeReplicate      string = "Replicate"
	CalMsgTypeJunoSec        string = "JunoSec"
	CalMsgTypeSSConnect      string = "SSCONNECT"
	CalMsgTypeSSConnectError string = "SSCONNECT_FAIL"
	CalMsgTypeWorker         string = "Worker"
	CalMsgTypeManager        string = "Manager"
	CalMsgTypeRidMapping     string = "MAP_RID"
	CalMsgTypeInit           string = "JunoInit"
)
View Source
const (
	CalMsgNameDbPut              string = "Put"
	CalMsgNameDbGet              string = "Get"
	CalMsgNameStart              string = "Start"
	CalMsgNameExit               string = "Exit"
	CalMsgNameInbound            string = "In"
	CalMsgNameInboundReplication string = "RIn"
	CalMsgNameOutbound           string = "Out"
	CalMsgNameGetEncrypKey       string = "GetKey"
)

Variables

This section is empty.

Functions

func LogManagerExit

func LogManagerExit()

func LogManagerStart

func LogManagerStart()

func LogToCal

func LogToCal(opcode proto.OpCode, opst proto.OpStatus, rht time.Duration, data []byte)

func LogWorkerExit

func LogWorkerExit(workerId int)

func LogWorkerStart

func LogWorkerStart(workerId int)

Types

type KeyValueBuffer

type KeyValueBuffer struct {
	bytes.Buffer
	// contains filtered or unexported fields
}

func NewKVBuffer

func NewKVBuffer() *KeyValueBuffer

func NewKVBufferForLog

func NewKVBufferForLog() *KeyValueBuffer

func (*KeyValueBuffer) Add

func (b *KeyValueBuffer) Add(key []byte, value string) *KeyValueBuffer

func (*KeyValueBuffer) AddBytes

func (b *KeyValueBuffer) AddBytes(key []byte, value []byte) *KeyValueBuffer

func (*KeyValueBuffer) AddCorrelationId

func (b *KeyValueBuffer) AddCorrelationId(id []byte) *KeyValueBuffer

func (*KeyValueBuffer) AddCreationTime

func (b *KeyValueBuffer) AddCreationTime(v uint32) *KeyValueBuffer

func (*KeyValueBuffer) AddDataTryNo

func (b *KeyValueBuffer) AddDataTryNo(v int32) *KeyValueBuffer

func (*KeyValueBuffer) AddDropReason

func (b *KeyValueBuffer) AddDropReason(reason string) *KeyValueBuffer

func (*KeyValueBuffer) AddErrOpStatus

func (b *KeyValueBuffer) AddErrOpStatus(st proto.OpStatus) *KeyValueBuffer

func (*KeyValueBuffer) AddExpirationTime

func (b *KeyValueBuffer) AddExpirationTime(v uint32) *KeyValueBuffer

func (*KeyValueBuffer) AddHexKey

func (b *KeyValueBuffer) AddHexKey(key []byte) *KeyValueBuffer

func (*KeyValueBuffer) AddInt

func (b *KeyValueBuffer) AddInt(key []byte, value int) *KeyValueBuffer

func (*KeyValueBuffer) AddLastModificationTime

func (b *KeyValueBuffer) AddLastModificationTime(v uint64) *KeyValueBuffer

func (*KeyValueBuffer) AddNamespace

func (b *KeyValueBuffer) AddNamespace(ns []byte) *KeyValueBuffer

func (*KeyValueBuffer) AddOpCode

func (b *KeyValueBuffer) AddOpCode(opcode proto.OpCode) *KeyValueBuffer

func (*KeyValueBuffer) AddOpRequest

func (b *KeyValueBuffer) AddOpRequest(request *proto.OperationalMessage) *KeyValueBuffer

difference from AddOpRequestInfo(): namespace and key not logged

func (*KeyValueBuffer) AddOpRequestInfo

func (b *KeyValueBuffer) AddOpRequestInfo(request *proto.OperationalMessage) *KeyValueBuffer

func (*KeyValueBuffer) AddOpRequestResponse

func (b *KeyValueBuffer) AddOpRequestResponse(req, resp *proto.OperationalMessage) *KeyValueBuffer

difference from AddOpRequestResponseInfo(): not log correlation id, key, or namespace

func (*KeyValueBuffer) AddOpRequestResponseInfo

func (b *KeyValueBuffer) AddOpRequestResponseInfo(req, resp *proto.OperationalMessage) *KeyValueBuffer

func (*KeyValueBuffer) AddOpRequestResponseInfoWithUser

func (b *KeyValueBuffer) AddOpRequestResponseInfoWithUser(req, resp *proto.OperationalMessage, user string) *KeyValueBuffer

func (*KeyValueBuffer) AddOpResponseInfo

func (b *KeyValueBuffer) AddOpResponseInfo(resp *proto.OperationalMessage) *KeyValueBuffer

func (*KeyValueBuffer) AddOpStatus

func (b *KeyValueBuffer) AddOpStatus(st proto.OpStatus) *KeyValueBuffer

func (*KeyValueBuffer) AddOriginator

func (b *KeyValueBuffer) AddOriginator(id proto.RequestId) *KeyValueBuffer

func (*KeyValueBuffer) AddReqIdString

func (b *KeyValueBuffer) AddReqIdString(id string) *KeyValueBuffer

func (*KeyValueBuffer) AddRequestHandleTime

func (b *KeyValueBuffer) AddRequestHandleTime(rhtus int) *KeyValueBuffer

func (*KeyValueBuffer) AddRequestID

func (b *KeyValueBuffer) AddRequestID(id proto.RequestId) *KeyValueBuffer

func (*KeyValueBuffer) AddShardId

func (b *KeyValueBuffer) AddShardId(shardId uint16) *KeyValueBuffer

func (*KeyValueBuffer) AddStatus

func (b *KeyValueBuffer) AddStatus(st string) *KeyValueBuffer

func (*KeyValueBuffer) AddTTL

func (b *KeyValueBuffer) AddTTL(v uint32) *KeyValueBuffer

func (*KeyValueBuffer) AddUInt64

func (b *KeyValueBuffer) AddUInt64(key []byte, value uint64) *KeyValueBuffer

func (*KeyValueBuffer) AddUser

func (b *KeyValueBuffer) AddUser(user string) *KeyValueBuffer

func (*KeyValueBuffer) AddVersion

func (b *KeyValueBuffer) AddVersion(v uint32) *KeyValueBuffer

type Status

type Status int

func CalStatus

func CalStatus(st proto.OpStatus) Status

func (Status) CalStatus

func (s Status) CalStatus() string

func (Status) NotSuccess

func (s Status) NotSuccess() bool

Directories

Path Synopsis
cal
Copyright 2023 PayPal Inc.
Copyright 2023 PayPal Inc.
test
Copyright 2023 PayPal Inc.
Copyright 2023 PayPal Inc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL