# Functions
Configure sets up the defaultLogger.
ConfigureTrafficLog sets up traffic logging.
CopyToContext copy logger from srcCtx to dstCtx.
CopyTrafficToContext copies the traffic logger from the current context to the new context.
Data Log a request.
DataWith Log a request with fields.
Debug Log a message at the debug defaultLevel.
No description provided by the author
DebugWith Log a message with fields at the debug defaultLevel.
No description provided by the author
Error Log a message at the error defaultLevel.
No description provided by the author
ErrorWith Log a message with fields at the error defaultLevel.
FromContext get Entry from context, if not found, return default logger.
No description provided by the author
Info Log a message at the info defaultLevel.
No description provided by the author
InfoWith Log a message with fields at the info defaultLevel.
No description provided by the author
No description provided by the author
NewEntry create a new LogEntry instead of override defaultzaplogger.
NewRateLimitPolicy create a rate limit policy r: rate, b: burst example: NewRateLimitPolicy(10, 1) means 10 logs per second.
No description provided by the author
No description provided by the author
No description provided by the author
StartTrafficRec starts a new traffic log entry.
StringLimit returns a string with limited length at most.
TrafficEntryFromContext get traffic dataLogger from context, allows us to pass dataLogger between functions.
No description provided by the author
No description provided by the author
Warn Log a message at the warn defaultLevel.
No description provided by the author
WarnWith Log a message with fields at the warn defaultLevel.
With binds a default field to a log message.
No description provided by the author
No description provided by the author
WithError binds an error to a log message.
WithField binds a field to a log message.
WithFields binds a set of fields to a log message.
No description provided by the author
WithLogger set given LogEntry to context and return new context, if ctx or entry is nil, return ctx.
No description provided by the author
WithTracing create copy of LogEntry with tracing.Span.
WithTrafficEntry set given LogTrafficEntry to context by using trafficLogCtxKey.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
DebugLevel enum -1: logs are typically voluminous, and are usually disabled in production.
ErrorLevel enum 2: logs are high-priority.
InfoLevel enum 0: is the default logging priority.
No description provided by the author
No description provided by the author
WarnLevel enum 1: logs are more important than Info, but don't need individual human review.
# Structs
AllowAllPolicy allow all log print.
Config for logging.
No description provided by the author
No description provided by the author
No description provided by the author
RateLimitPolicy rate limit to control log print r: rate, b: burst.
RejectAllPolicy reject all log print.
SamplingPolicy log print sampling with ratio.
Traffic is provided by user when logging.
TrafficLogConfig for traffic logging.
No description provided by the author
TrafficReq is provided by user when logging.
No description provided by the author
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author