evantahler/actionhero — pull request #409 by dunse (2014-06-24 14:38:38+00:00)
Title: Added support for winston's string interpolation

With current logger.js, we are limited to the following logging patterns:
api.log("Current log entry", "info");
2014-06-25 00:35:55 - info: Current log entry
api.log("Current log entry with metadata:", "info", {myKey: "Value"});
2014-06-25 00:35:55 - info: Current log entry with metadata: myKey=Value
api.log("Current log entry with string %s", "info", "interpolation");
2014-06-25 00:35:55 - info: Current log entry with string interpolation

This patch introduce patterns such as:
api.log("New log entry with %s %s", "info", "string", "interpolation");
2014-06-25 00:35:55 - info: New log entry with string interpolation
api.log("New log entry with %s %s and metadata:", "info", "string", "interpolation", {key1: "val1", key2: "val2"});
2014-06-25 00:35:55 - info: New log entry with string interpolation and metadata: key1=val1, key2=val2