Open
Description
We are seeing some interesting side-effect of the printf-style feature outlined here: sequelize/sequelize#17448
Long story short, we are using debug to print SQL queries that are executed against database servers and whenever people use a like or ilike query in combination with % at the beginning, it sometimes happens that the logs show NaN
. This happens when the search term starts with any of the printf-style characters, e.g. for something like SELECT * FROM foo WHERE name LIKE %fauzi%
. The logs will then contain NaNauzi
.
Would it be possible to force a debug log statement to ignore any printf formatting?
Something like:
const log = debug('sql')
log("%fauzi%", { printfFormatting: false})
Metadata
Metadata
Assignees
Labels
No labels