{"modulePath":"github.com/GoPlugin/pluginV2Lib/pluginV2-relay","version":"v0.0.0-20230622090102-3f0f60f3c385","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package logger\n\n## Functions\n\n```go\nfunc Critical(l Logger, args ...interface{})\n```\nCritical emits critical level logs (a remapping of [zap.DPanicLevel](/go.uber.org/zap#DPanicLevel)) or falls back to error level with a '\\[crit]' prefix.\n\n```go\nfunc Criticalf(l Logger, format string, values ...interface{})\n```\nCriticalf emits critical level logs (a remapping of [zap.DPanicLevel](/go.uber.org/zap#DPanicLevel)) or falls back to error level with a '\\[crit]' prefix.\n\n```go\nfunc Criticalw(l Logger, msg string, keysAndValues ...interface{})\n```\nCriticalw emits critical level logs (a remapping of [zap.DPanicLevel](/go.uber.org/zap#DPanicLevel)) or falls back to error level with a '\\[crit]' prefix.\n\n```go\nfunc NewOCRWrapper(l Logger, trace bool, saveError func(string)) ocrtypes.Logger\n```\nNewOCRWrapper returns a new [ocrtypes.Logger](/github.com/GoPlugin/pluginV2Lib/libocr/commontypes#Logger) backed by the given Logger. Note: trace logs are written at debug level, regardless of any build tags.\n\n## Types\n\n```go\ntype Config struct {\n\tLevel zapcore.Level\n}\n```\n\n```go\nfunc (c *Config) New() (Logger, error)\n```\nNew returns a new Logger for Config.\n\n```go\ntype Logger interface {\n\tName() string\n\n\tDebug(args ...interface{})\n\tInfo(args ...interface{})\n\tWarn(args ...interface{})\n\tError(args ...interface{})\n\tPanic(args ...interface{})\n\tFatal(args ...interface{})\n\n\tDebugf(format string, values ...interface{})\n\tInfof(format string, values ...interface{})\n\tWarnf(format string, values ...interface{})\n\tErrorf(format string, values ...interface{})\n\tPanicf(format string, values ...interface{})\n\tFatalf(format string, values ...interface{})\n\n\tDebugw(msg string, keysAndValues ...interface{})\n\tInfow(msg string, keysAndValues ...interface{})\n\tWarnw(msg string, keysAndValues ...interface{})\n\tErrorw(msg string, keysAndValues ...interface{})\n\tPanicw(msg string, keysAndValues ...interface{})\n\tFatalw(msg string, keysAndValues ...interface{})\n\n\tSync() error\n}\n```\nLogger is a minimal subset of GoPlugin/pluginV2Lib/pluginV2/core/logger.Logger implemented by go.uber.org/zap.SugaredLogger\n\n```go\nfunc Helper(l Logger, skip int) Logger\n```\nHelper returns a logger with 'skip' levels of callers skipped, if 'l' has a method \\`Helper(int) L\\`, where L implements Logger, otherwise it returns l. See [zap.AddCallerSkip](/go.uber.org/zap#AddCallerSkip)\n\n```go\nfunc Named(l Logger, n string) Logger\n```\nNamed returns a logger with name 'n', if 'l' has a method \\`Named(string) L\\`, where L implements Logger, otherwise it returns l.\n\n```go\nfunc New() (Logger, error)\n```\nNew returns a new Logger with the default configuration.\n\n```go\nfunc NewWith(cfgFn func(*zap.Config)) (Logger, error)\n```\nNewWith returns a new Logger from a modified [zap.Config](/go.uber.org/zap#Config).\n\n```go\nfunc Nop() Logger\n```\nNop returns a no-op Logger.\n\n```go\nfunc Test(tb testing.TB) Logger\n```\nTest returns a new test Logger for tb.\n\n```go\nfunc TestObserved(tb testing.TB, lvl zapcore.Level) (Logger, *observer.ObservedLogs)\n```\nTestObserved returns a new test Logger for tb and ObservedLogs at the given Level.\n\n```go\nfunc With(l Logger, keyvals ...interface{}) Logger\n```\nWith returns a Logger with keyvals, if 'l' has a method \\`With(...interface{}) L\\`, where L implements Logger, otherwise it returns l.\n\n```go\ntype SugaredLogger interface {\n\tLogger\n\t// ErrorIf logs the error if present.\n\tErrorIf(err error, msg string)\n\t// ErrorIfFn calls fn() and logs any returned error along with msg.\n\t// Unlike ErrorIf, this can be deffered inline, since the function call is delayed.\n\tErrorIfFn(fn func() error, msg string)\n}\n```\nSugaredLogger extends the base Logger interface with syntactic sugar, similar to zap.SugaredLogger.\n\n```go\nfunc Sugared(l Logger) SugaredLogger\n```\nSugared returns a new SugaredLogger wrapping the given Logger.\n\n","path":"github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/logger","name":"logger","synopsis":"","isRedistributable":true}
