flatiron/winston — pull request #190 by Dignifiedquire (2012-10-20 09:25:15+00:00)
Title: [feature] implement a way to use util.format in strings (includes tests)

As discussed in #121 I've implemented a way to use `util.format` in the logger. I've removed `common.format` as it is not needed anymore and added tests in `logger-test.js` for all functionality.
A short description here what is possible now:

```javascript
logger.log('info', 'test message %s', 'my string');
// info: test message my string

logger.log('info', 'test message %d', 123);
// info: test message 123

logger.log('info', 'test message %j', {number: 123}, {});
// info: test message {"number":123}

logger.log('info', 'test message %s, %s', 'first', 'second', {number: 123});
// info: test message first, second
// meta = {number: 123}

logger.log('info', 'test message', 'first', 'second', {number: 123});
// info: test message first second
// meta = {number: 123}

logger.log('info', 'test message %s, %s', 'first', 'second', {number: 123}, function();
// info: test message first, second
// meta = {numer: 123}
// callback = function(){}

logger.log('info', 'test message', 'first', 'second', {number: 123}, function());
// info: test message first second
// meta = {numer: 123}
// callback = function(){}

```