launchdarkly / node-server-sdk

LaunchDarkly Server-side SDK for Node
Other
79 stars 65 forks source link

"Flushing %d events" -- incorrect log message #277

Closed martinpovolny closed 1 year ago

martinpovolny commented 1 year ago

Is this a support request? This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going here or by emailing support@launchdarkly.com.

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

Describe the bug A clear and concise description of what the bug is.

https://github.com/launchdarkly/node-server-sdk/blob/main/event_processor.js#LL217C1-L218C1

        config.logger.debug('Flushing %d events', worklist.length);

debug does not support printf style expansions

therefor the log is: "Flushing %d events"

To reproduce Steps to reproduce the behavior.

Expected behavior A clear and concise description of what you expected to happen.

I expect a message such as:

Flushing 100 events

Logs If applicable, add any log output related to your problem.

Flushing %d events

need to change the line to something like:

config.logger.debug('Flushing ' + worklist.length + ' events');

or

config.logger.debug(`Flushing ${worklist.length} events`);

SDK version The version of this SDK that you are using.

this is the current code base

Language version, developer tools For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.

irrelevant

OS/platform For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.

any

Additional context Add any other context about the problem here.

martinpovolny commented 1 year ago

Seems this was addressed in https://github.com/launchdarkly/node-server-sdk/issues/257 and that it's an issue of the logger configuration that is owned by the application, not the SDK.