Javascript console.log vs 杜兰达尔 system.log

Javascript console.log vs Durandal system.log

console.log vs 杜兰达尔 system.log 我试图了解他们是否相似, 我相信它们都提供相同的输出 - 在控制台中登录

我是不是漏掉了什么?

你是对的。除了可以禁用 system.log 之外,它们提供完全相同的输出。它也适用于大多数(如果不是全部)浏览器。

system.log 的文档中所述:

Logs data to the console. Pass any number of parameters to be logged. Log output is not processed if the framework is not running in debug mode.

使用 system.debug 启用调试模式。

您可以在 Github 上查看 source code of system.log