Google chrome 铬>;console.info>;黑色打印(与console.log相同)
有没有人在你那里经历过这种情况Google chrome 铬>;console.info>;黑色打印(与console.log相同),google-chrome,google-chrome-devtools,Google Chrome,Google Chrome Devtools,有没有人在你那里经历过这种情况 console.info('hi'); hi//此hi打印为黑色,而不是蓝色 控制台屏幕截图: console.info多年来一直使用蓝色打印!现在让我惊讶的是,现在不是了 我在chrome上找不到任何使输出像那样变成色盲的设置 看起来这是按设计缩进的,如图所示,但是。。这里有一条出路作为替代 console.log(“%c这将被格式化为蓝色大文本”,“颜色:蓝色;字体大小:x-large”) 不要忘记那里的%c 要将其包装到函数中,可以使用以下kick s
console.info('hi');
hi//此hi打印为黑色,而不是蓝色
控制台屏幕截图:
console.info多年来一直使用蓝色打印!现在让我惊讶的是,现在不是了
我在chrome上找不到任何使输出像那样变成色盲的设置 看起来这是按设计缩进的,如图所示,但是。。这里有一条出路作为替代
console.log(“%c这将被格式化为蓝色大文本”,“颜色:蓝色;字体大小:x-large”)代码>
不要忘记那里的%c
要将其包装到函数中,可以使用以下kick starter代码:
function sysConsole(messageType,message){
if ( messageType === 'info') {
s = '%c' + '##' + messageType + ': ' + message;
// the ## will enable you to do filtering at the console
// by typing ##info
console.log (s, 'color: blue;');
}
// you can have other messageTypes later (to be wired for different colors )
return false;
}
对于未来的灵感,请转到Chrome开发者决定您不需要它,它会让人哑口无言。你知道有什么扩展可以恢复这种感觉吗?console.info
被删除了吗?这里提到: