Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LogTypeLog is normal log type. LogTypeLog = "log" // LogTypeRequest is Request log type. LogTypeRequest = "request" )
View Source
const (
CORRELATION_ID contextKey = "x-correlation-id"
)
Variables ¶
This section is empty.
Functions ¶
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(log Logger) grpc.UnaryServerInterceptor
Unary server interceptor
Types ¶
type LogLevel ¶ added in v0.3.0
type LogLevel string
LogLevel is Dapr Logger Level type.
const ( // DebugLevel has verbose message. DebugLevel LogLevel = "debug" // InfoLevel is default log level. InfoLevel LogLevel = "info" // WarnLevel is for logging messages about possible issues. WarnLevel LogLevel = "warn" // ErrorLevel is for logging errors. ErrorLevel LogLevel = "error" // FatalLevel is for logging fatal messages. The system shuts down after logging the message. FatalLevel LogLevel = "fatal" // UndefinedLevel is for undefined log level. UndefinedLevel LogLevel = "undefined" )
type Logger ¶
type Logger interface { // Info logs a message at level Info. Info(msg string, keysAndValues ...interface{}) // Debug logs a message at level Debug. Debug(msg string, keysAndValues ...interface{}) // Warn logs a message at level Warn. Warn(msg string, keysAndValues ...interface{}) // Error logs a message at level Error. Error(errVal error, keysAndValues string, args ...interface{}) // Fatal logs a message at level Fatal then the process will exit with status set to 1. Fatal(msg string, keysAndValues ...interface{}) }
Logger includes the logging api sets.
Click to show internal directories.
Click to hide internal directories.