Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure args match verbs in ConsoleLogger #877

Merged
merged 1 commit into from May 4, 2022

Conversation

jkanywhere
Copy link
Contributor

Fix the format call for Supplied event.

Previously, \n%!(EXTRA string=) was appended to SUPPLY logs when
ModuleName was empty.

Add tests to ensure format string contains the same number of verbs as
there are arguments when logging an Event using ConsoleLogger for
all relevant event types,

Module info was added to fxevent in #863.

Fix the format call for `Supplied` event.

Previously, `\n%!(EXTRA string=)` was appended to `SUPPLY` logs when
`ModuleName` was empty.

Add tests to ensure format string contains the same number of verbs as
there are arguments when logging an `Event` using `ConsoleLogger` for
all relevant event types,

Module info was added to fxevent in uber-go#863.
@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #877 (b69e09d) into master (81f070e) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #877   +/-   ##
=======================================
  Coverage   98.53%   98.53%           
=======================================
  Files          30       30           
  Lines        1157     1157           
=======================================
  Hits         1140     1140           
  Misses         11       11           
  Partials        6        6           
Impacted Files Coverage Δ
fxevent/console.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81f070e...b69e09d. Read the comment docs.

Copy link
Contributor

@sywhang sywhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sywhang sywhang merged commit c8d593a into uber-go:master May 4, 2022
@jkanywhere jkanywhere deleted the console-log-extra-string branch May 4, 2022 22:06
@jkanywhere
Copy link
Contributor Author

Example of the previous malformed log

[Fx] SUPPLY	envfx.Context
%!(EXTRA string=)[Fx] SUPPLY	servicefx.Metadata
%!(EXTRA string=)[Fx] PROVIDE	tally.Scope <= mypackage.Test__Module_construction_errors.func2.1()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants