question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Messages aren't formatted in logs

See original GitHub issue

Describe the bug

Messages aren’t formatted with the new devUtils loggers.

Environment

  • msw: 0.33.2
  • nodejs: 16.x
  • npm: 6.x

Expected behavior

Logs to have specifiers replaced with correct data.

Reproduction

devUtils.warn('Expected a mocking resolver function to return a mocked response Object, but got: %s. Original response is going to be used instead.', false);

Expected

Expected a mocking resolver function to return a mocked response Object, but got: false. Original response is going to be used instead.

Actual

Expected a mocking resolver function to return a mocked response Object, but got: %s. Original response is going to be used instead.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
OmgImAlexiscommented, Aug 1, 2021

The first argument “message” should be formatted using util.format with the optional arguments passed in.

0reactions
kettanaitocommented, Aug 4, 2021

I’ll add the missing tests and update the interceptors version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format of messages in logs - IBM
Messages in logs are recorded in a specific format. To configure Security Access Manager message logs and trace logs to produce output in...
Read more >
Python logging sometimes writing message to file but not format
Having a new problem where the logger is writing about every other line without the format, just the message.
Read more >
Format errors in logs | Error Reporting - Google Cloud
To learn how to format the exception message and stack trace, see the ReportedErrorEvent section on the report reference page for Error Reporting....
Read more >
Tip: Use a Human-Readable Logging Format - Reflectoring
This article discusses how the format of a log message helps us and what such a format should look like.
Read more >
Structured Message Formats: Thoughts on What To Log
Structured Message Formats: Thoughts on What To Log. Logging and Messaging aren't the most glamorous aspects of software engineering but are necessary.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found