重庆熊猫 Loading

ExtJS类成员-日志处理

更新记录
2022年7月5日 发布。
2022年7月2日 从笔记迁移到博客。

ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html

唤起错误并包含额外的信息

Ext.raise ( String/Object err )

实例:

Ext.raise({
    msg: 'You cannot do that!',
    option: {},
    code: 100
});

日志输出

log ( [options], [message] ) 

options支持的Key:
level:One of: "error", "warn", "info" or "log" (the default is "log")
dump:作为消息的一部分转储到日志的对象
stack:如果为True,则在日志中包含堆栈跟踪
indent:使后续日志语句缩进一步
outdent:使此语句和下面的语句缩进一步

实例:

Ext.log("Panda");  //直接输出
Ext.log({level:'warn',stack:true}, "Test");  //设置日志等级,并显示调用栈
posted @ 2022-07-05 08:18  重庆熊猫  阅读(207)  评论(0编辑  收藏  举报