Skip to content

Commit

Permalink
Support fast Zap logging (#361)
Browse files Browse the repository at this point in the history
This adds a `zapcore.MarshalLogObject/Array` method to all generated structs and its underlying components, enums, and non-primitive typedefs, implementing Zap marshalers (i.e. [ObjectMarshaler](https://godoc.org/go.uber.org/zap/zapcore#ObjectMarshaler), [ArrayMarshaler](https://godoc.org/go.uber.org/zap/zapcore#ArrayMarshaler)). For typedefs of primitives, the logging is up to the user, simply by casting it down to the root type and using the respective `Add/Append...` method of the Zap encoder.
  • Loading branch information
mh-park authored Aug 6, 2018
1 parent 53375f1 commit 19af15f
Show file tree
Hide file tree
Showing 55 changed files with 4,267 additions and 17 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ go_import_path: go.uber.org/thriftrw

matrix:
include:
- go: 1.7
- go: 1.8
- go: 1.9
- go: '1.10'
env: LINT=1
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
- No changes yet.
- Added `zapcore.MarshalLogObject/Array` method to all generated structs
and its underlying components, enums, and non-primitive typedefs, implementing
Zap marshalers.

## [1.12.0] - 2018-06-25
### Added
Expand Down
133 changes: 133 additions & 0 deletions envelope/internal/tests/enums/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions envelope/internal/tests/exceptions/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions envelope/internal/tests/services/cache_clear.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions envelope/internal/tests/services/cache_clearafter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions envelope/internal/tests/services/conflictingnames_setvalue.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions envelope/internal/tests/services/keyvalue_deletevalue.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 19af15f

Please sign in to comment.