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

printf message formatting broken #36

Closed
andrew-property-xyz opened this issue Jan 2, 2021 · 3 comments
Closed

printf message formatting broken #36

andrew-property-xyz opened this issue Jan 2, 2021 · 3 comments

Comments

@andrew-property-xyz
Copy link

I have just upgraded the version of roarr logger from 2.15.4 to 3.2.0 within a Node 12.19.0 application.

I make use of printf message formatting extensively throughout the application. With v2.15.4, I had not encountered any issues with this. For example:

log.debug('Processing feed [%s] for %d agents', feedId, agentCount)

would work perfectly and output something like this:

Processing feed [abc123] for 25 agents

With roarr v3.2.0, however, the output is this:

Processing feed [abc123] for %d agents

In fact, the behaviour I am observing is that all substitution variables apart from the first one seem to be completely ignored.

To resolve the issue, I reverted to roarr v2.15.4.

@gajus gajus added the bug label Jan 2, 2021
@gajus
Copy link
Owner

gajus commented Jan 2, 2021

Yikes. Looks like http://npmjs.com/sprintfit only supports %s interpolation.

@gajus
Copy link
Owner

gajus commented Jan 3, 2021

Fixed in 5e264c9

@gajus gajus closed this as completed Jan 3, 2021
@gajus
Copy link
Owner

gajus commented Jan 3, 2021

🎉 This issue has been resolved in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Jan 3, 2021
mmkal pushed a commit to mmkal/roarr that referenced this issue Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants