Skip to content

Utilize “no operation” types for logging and metrics.#29

Merged
fr33r merged 2 commits intomasterfrom
freer/utilize-no-op
Jun 30, 2020
Merged

Utilize “no operation” types for logging and metrics.#29
fr33r merged 2 commits intomasterfrom
freer/utilize-no-op

Conversation

@fr33r
Copy link
Copy Markdown
Contributor

@fr33r fr33r commented Jun 5, 2020

Description

Within unit.go, there were several methods on unit responsible for checking to see if a logger or metric scope was provided during instantiation prior to utilization. Equipped with the knowledge that both zap and tally offer “no operation” types, the code can be simplified so that these methods are no longer necessary.

Tackles #29 .

Rationale

The code becomes cleaner and is easier to maintain without these unnecessary methods. It also fully leverages capabilities of both the zap and tally public APIs.

Suggested Versions

v2.1.1
v3.1.0

Example Usage

There are no API changes to work as a result of this change - it is purely internal.

@fr33r fr33r merged commit 97b6cac into master Jun 30, 2020
@fr33r fr33r deleted the freer/utilize-no-op branch July 27, 2020 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant