Skip to content

discussions Search Results · repo:uber-go/zap language:Go

Filter by

68 results
 (49 ms)

68 results

inuber-go/zap (press backspace or delete to remove)

I had set up the zap logger with following configuration outLevel := zap.LevelEnablerFunc(func(level zapcore.Level) bool { return level zapcore.WarnLevel }) // Warnings and everything above ...

what is the difference? zap or zap (sugared)

Dear zap maintainers, We (OpenTelemetry Go) are planning to publish a zapcore.Core that emits log entries to OpenTelemetry. Are you able to make a review of the implementation so that our users will ...

I have 2 questions regarding logging with zap. Appreciate comments and a healthy discussion on this! 🙏 Q1. Understand that there are ways to implement zap logger. I am having difficulty understanding ...

Hey there, Using this zap go.uber.org/zap@1.26 It looks like something did get change recently as production logger stopped returning logs in json format, but instead it does it in debug or dev mode ...

Hey folks. I use zap and for test usually I use zaptest to ensure that I ll see logs only from failed tests in output. But now I need to verify that some logs were written, in this case zap provides a ...

This is my code,and I want to set trace_id into log file. The trace_id is generate on middleware func NewZapLog(logFileName, traceId string) *zap.Logger { encoder := zapcore.NewConsoleEncoder(ZapLogEncoderConfig()) ...

type Config struct { // ErrorOutputPaths is a list of URLs to write internal logger errors to. // The default is standard error. // // Note that this setting only affects internal errors; for sample ...

I am working on a log package and hope to configure whether to use log rotation through switches. Previous code did not support log rotate // using zap.Config and cannot log rotate // Build constructs ...

I ve discovered its easy to end up with the same Field logged with different variations on a key name in different parts of a code base and this complicates log querying. E.g. var dbname = mydb logger.Info( ...