hexojs / hexo-log

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`%s` is not replaced correctly in hexo-log@2.0.0

stevenjoezhang opened this issue · comments

commented

Test script:

require('hexo-log')().fatal({'Error': 'Error'}, 'Rendered: %s', 'filename')

With hexo-log@1.0.0, the output is

FATAL Rendered: filename

With hexo-log@2.0.0, the output is

FATAL { Error: 'Error' } Rendered: %s filename

The behaviour is changed in #34

See also https://github.com/hexojs/hexo/blob/eef2eac874b5118cae73fcdb4acba3a6c744f2b5/lib/hexo/index.js#L468-L472
https://github.com/hexojs/hexo-bunyan/blob/b2752b1eaf590e5620b17e09349860a4a862c597/lib/bunyan.js#L937-L970