首页 > 解决方案 > ionic3 中的 Log.e()、Log.d()?

问题描述

我想像在 android studio 中使用 Log.d 和 Log.3 一样获取日志。有什么方法可以在 ionic 中执行 Log.e() 和 Log.d() 吗?除了使用 console.log()?

标签: androidionic-frameworkionic3

解决方案


您可以使用以下内容进行调试以及使用控制台进行错误处理

console.log Black color text with no icon

console.info Blue color text with icon

console.debug Pure black color text

console.warn Yellow color text with icon

console.error Red Color text with icon

console.error() method writes an error message to the console.
console.info() method outputs an informational message to the console
console.warn() method outputs a warning message to the console

有关更多信息,请查看链接


推荐阅读