Documentation ¶
Index ¶
Constants ¶
View Source
const (
CORE_LOGGER string = "CORE_LOGGER"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ILog ¶
type ILog interface { logr.Logger // Fatal logs an error message with the given message as additional context. // // The msg argument should be used to add some constant description to // the log line. Fatal(err error, msg string) // For wraps the current log handle with various context centric variables (utilized in request tracing) For(ctx context.Context) ILog // Warn logs a non-error message with the given key/value pairs as context. // // The msg argument should be used to add some constant description to // the log line. The key/value pairs can then be used to add additional // variable information. The key/value pairs should alternate string // keys and arbitrary values. Warn(msg string, keysAndValues ...interface{}) // Debug logs a non-error message with the given key/value pairs as context. // // The msg argument should be used to add some constant description to // the log line. The key/value pairs can then be used to add additional // variable information. The key/value pairs should alternate string // keys and arbitrary values. Debug(msg string, keysAndValues ...interface{}) }
Inspired from https://github.com/go-logr/zapr, some functions is copy from the repo.
var ( // JSONLogger is global json log format logr JSONLogger ILog // witholds a handle on a trancing object with which the library can log traces Span opentracing.Span )
func NewJSONLogger ¶
func NewJSONLogger(w zapcore.WriteSyncer, span opentracing.Span) ILog
NewJSONLogger creates a new json logging object using the given Zap Logger to log.
Click to show internal directories.
Click to hide internal directories.