-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Comparing changes
Open a pull request
base repository: uber-go/zap
base: v1.15.0
head repository: uber-go/zap
compare: v1.16.0
- 14 commits
- 26 files changed
- 11 contributors
Commits on May 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for c9ca999 - Browse repository at this point
Copy the full SHA c9ca999View commit details
Commits on May 26, 2020
-
Configuration menu - View commit details
-
Copy full SHA for e931a6b - Browse repository at this point
Copy the full SHA e931a6bView commit details
Commits on Jun 10, 2020
-
json: Don't panic for nil Encode{Time, Duration} (#835)
Fixes #834 The JSON encoder assumes that encoders for `time.Time` and `time.Duration` are always specified, which causes nil pointer dereference panics. Fix this by treating nil encoders for time and duration as no-ops. This will fall back to existing logic in the JSON encoder that handles no-op time and duration encoders.
Configuration menu - View commit details
-
Copy full SHA for 3640f92 - Browse repository at this point
Copy the full SHA 3640f92View commit details
Commits on Jun 11, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 39aa3a1 - Browse repository at this point
Copy the full SHA 39aa3a1View commit details
Commits on Jul 7, 2020
-
Added zapcore.TimeEncoderOfLayout (#629)
I added `zapcore.TimeEncoderOfFormat` to make it easy to build `TimeEncoder` of custom format. You can use it in code: ```go config := zap.NewDevelopmentConfig() config.EncoderConfig.EncodeTime = zapcore.TimeEncoderOfLayout("06/01/02 03:04pm") ``` or, with JSON: ```json { "encoderConfig": { "timeEncoder": { "layout": "06/01/02 03:04pm" } } } ``` or, with YAML: ```yaml encoderConfig: timeEncoder: layout: '06/01/02 03:04pm' ```
Configuration menu - View commit details
-
Copy full SHA for 275c926 - Browse repository at this point
Copy the full SHA 275c926View commit details
Commits on Jul 17, 2020
-
Support configurable delimiter for console encoder (#697)
It would be nice to have a configurable delimiter for console encoder, tab by default. For our cases, we prefer to have space as element delimiter. A custom console delimiter can be set through the `consoleSeparator` encoder configuration.
Configuration menu - View commit details
-
Copy full SHA for 53a3870 - Browse repository at this point
Copy the full SHA 53a3870View commit details
Commits on Aug 5, 2020
-
consoleEncoder: put cloned jsonEncoder back to pool (#852)
consoleEncoder clone a jsonEncoder in `writeContext`, but never put back to pool after use. This make zap do more memory allocations, and may increase gc time.
Configuration menu - View commit details
-
Copy full SHA for 639461d - Browse repository at this point
Copy the full SHA 639461dView commit details
Commits on Aug 14, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 2314926 - Browse repository at this point
Copy the full SHA 2314926View commit details
Commits on Aug 18, 2020
-
Honor CallerSkip when taking stack traces & add the StackSkip field (#…
…843) * Honor `CallerSkip` when taking a stack trace. Both the caller and stack trace will now point to the same frame. * Add `StackSkip` which is similar to `Stack` but allows skipping frames from the top of the stack. This removes the internal behavior of skipping zap specific stack frames when taking a stack trace, and instead relies on the same behavior used to calculate the number of frames to skip for getting the caller to also skip frames in the stack trace. Fixes #512, fixes #727
Configuration menu - View commit details
-
Copy full SHA for 2657839 - Browse repository at this point
Copy the full SHA 2657839View commit details
Commits on Aug 28, 2020
-
Show "<nil>" for nil Stringer. (#854)
In encodeStringer, instead of returning an error when a panic occurs when calling String() on a nil pointer, use the string value "<nil>" like the fmt package does. It is not always possible to handle this case by fixing the implementation of String to not panic. This requires implementing String with a pointer receiver, which doesn't work if you need to be able to call String on non-addressable values.
Configuration menu - View commit details
-
Copy full SHA for 663c590 - Browse repository at this point
Copy the full SHA 663c590View commit details -
Update Stringer panic check to look like stdlib (#857)
There's no behaviour changes, but there are a couple of refactorings: * Name the named return error `retErr`, and use explicit return values. The only purpose of the named return is for the panic handling. * Make the panic handling look more similar to the standard library and add a reference to the stdlib code in fmt that does the same checks.
Configuration menu - View commit details
-
Copy full SHA for be2be86 - Browse repository at this point
Copy the full SHA be2be86View commit details
Commits on Sep 1, 2020
-
Add options to customize Fatal behaviour for better testability (#861)
Fixes #846. There's currently no easy way to test Fatal from outside of zap, as it triggers an os.Exit(1). Add options to customize the behaviour (allowing for panic, or Goexit), which can be used with `recover()` in tests.
Configuration menu - View commit details
-
Copy full SHA for 217b2cb - Browse repository at this point
Copy the full SHA 217b2cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for d0a4b9e - Browse repository at this point
Copy the full SHA d0a4b9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 404189c - Browse repository at this point
Copy the full SHA 404189cView commit details
There are no files selected for viewing