Unexpected `[sprintf] unexpected placeholder` in simple logging (single param) strings contains a '%'
Closed this issue ยท 4 comments
rondinif commented
code that reproduce the issue
console.log("[[[");
try {
console.log(JSON.stringify(sparqlQueryScientificName.results));
console.log("===");
log.trace('%s', JSON.stringify(sparqlQueryScientificName.results));
} catch(errorLogging) {
log.error(errorLogging.message);
}
console.log("]]]");
actual
[[[
{"bindings":[{"scientificname":{"type":"literal","value":"Cucumis anguria"},"taxonrank":{"type":"uri","value":"http://www.wikidata.org/entity/Q7432"},"image":{"type":"uri","value":"http://commons.wikimedia.org/wiki/Special:FilePath/Cucumis%20anguria.JPG"},"taxonrankLabel":{"xml:lang":"en","type":"literal","value":"species"}}]}
===
{"context":{"logLevel":50},"message":"[sprintf] unexpected placeholder","sequence":31,"time":1556820461648,"version":"1.0.0"}
]]]
expected
[[[
{"bindings":[{"scientificname":{"type":"literal","value":"Cucumis anguria"},"taxonrank":{"type":"uri","value":"http://www.wikidata.org/entity/Q7432"},"image":{"type":"uri","value":"http://commons.wikimedia.org/wiki/Special:FilePath/Cucumis%20anguria.JPG"},"taxonrankLabel":{"xml:lang":"en","type":"literal","value":"species"}}]}
===
{"context":{"logLevel":10},"message":"{\"bindings\":[{\"scientificname\":{\"type\":\"literal\",\"value\":\"Cucumis anguria\"},\"taxonrank\":{\"type\":\"uri\",\"value\":\"http://www.wikidata.org/entity/Q7432\"},\"image\":{\"type\":\"uri\",\"value\":\"http://commons.wikimedia.org/wiki/Special:FilePath/Cucumis%20anguria.JPG\"},\"taxonrankLabel\":{\"xml:lang\":\"en\",\"type\":\"literal\",\"value\":\"species\"}}]}","sequence":33,"time":1556821362583,"version":"1.0.0"}
]]]
rondinif commented
teukuamru commented
really need this to be fixed ๐
gajus commented
Sorry for the delay.
gajus commented
๐ This issue has been resolved in version 2.15.4 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐