Chrome中的console.log时间戳? [英] console.log timestamps in Chrome?

查看:2275
本文介绍了Chrome中的console.log时间戳?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有快速的方式让Chrome在 console.log 写入中输出时间戳(就像Firefox一样)。或者正在预先添加新的Date().getTime()唯一的选项?

Is there any quick way of getting Chrome to output timestamps in console.log writes (like Firefox does). Or is prepending new Date().getTime() the only option?

推荐答案

在Chrome中,可以选择名为显示时间戳的控制台设置(开发人员工具 - >控制台 - >设置[右上角]),这正是我所需要的。

In Chrome, there is the option is Console Settings (Developer Tools -> Console -> Settings [upper-right corner] ) named "Show timestamps" which is exactly what I needed.

我刚刚找到它。没有其他肮脏的黑客需要破坏占位符,并删除邮件记录的代码中的地方。

I've just found it. No other dirty hacks needed that destroys placeholders and erases place in the code where the messages was logged from.

这篇关于Chrome中的console.log时间戳?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆