有人使用yui logger跟踪yui事件吗?有没有办法过滤它?

时间:2021-08-18 22:01:59

The problem that I'm having with it, is that it tracks all the events in the log reader, too. This makes it very difficult to work with. As I scroll up down, click or move in the reader to examine events, it's scrolling all over the place adding new events. Is there a way to filter it to only include certain events from certain sources? Am I likely doing something wrong? I'm using the 2.7 version with firefox.

我遇到的问题是,它也跟踪日志阅读器中的所有事件。这使得它很难使用。当我向上滚动,单击或移动阅读器以检查事件时,它会在整个地方滚动添加新事件。有没有办法过滤它只包含某些来源的某些事件?我可能做错了吗?我正在使用Firefox版本的2.7版本。

3 个解决方案

#1


Keith -- It sounds like you're using the -debug version of all of your files, is that correct? If so, try including only the -debug version of the components with which you're most directly working (ie, user logger-min.js instead of logger-debug.js). -Eric

Keith - 听起来你正在使用所有文件的-debug版本,这是正确的吗?如果是这样,尝试仅包括部件的-debug版本与您最直接的工作(即用户记录-min.js,而不是记录仪-debug.js)。 -Eric

#2


I had the same problem recently. What I've done is to automatically hide all logger sources. You can then manually check the ones you want to view. Using YUI 2.7, this seems to do the trick:

我最近遇到了同样的问题。我所做的是自动隐藏所有记录器源。然后,您可以手动检查要查看的内容。使用YUI 2.7,这似乎可以解决问题:

//remove default sources
YAHOO.widget.Logger.sources = [];
var logger = new YAHOO.widget.LogReader();
//hide all sources loaded after the logger is instantiated
YAHOO.widget.Logger.sourceCreateEvent.subscribe(function(sType, aArgs, oSelf){     
  oSelf.hideSource(aArgs[0]);
}, logger);

#3


Based on Eric's answer, I've found it's convenient for my workflow to use the YUI loader filter configuration property:

基于Eric的回答,我发现我的工作流程使用YUI加载器过滤器配置属性很方便:

filter: { 
          'searchExp': "events-min\\.js", 
          'replaceStr': "events-debug.js"
      }

and just load the debug file that I'm interested in.

然后加载我感兴趣的调试文件。

#1


Keith -- It sounds like you're using the -debug version of all of your files, is that correct? If so, try including only the -debug version of the components with which you're most directly working (ie, user logger-min.js instead of logger-debug.js). -Eric

Keith - 听起来你正在使用所有文件的-debug版本,这是正确的吗?如果是这样,尝试仅包括部件的-debug版本与您最直接的工作(即用户记录-min.js,而不是记录仪-debug.js)。 -Eric

#2


I had the same problem recently. What I've done is to automatically hide all logger sources. You can then manually check the ones you want to view. Using YUI 2.7, this seems to do the trick:

我最近遇到了同样的问题。我所做的是自动隐藏所有记录器源。然后,您可以手动检查要查看的内容。使用YUI 2.7,这似乎可以解决问题:

//remove default sources
YAHOO.widget.Logger.sources = [];
var logger = new YAHOO.widget.LogReader();
//hide all sources loaded after the logger is instantiated
YAHOO.widget.Logger.sourceCreateEvent.subscribe(function(sType, aArgs, oSelf){     
  oSelf.hideSource(aArgs[0]);
}, logger);

#3


Based on Eric's answer, I've found it's convenient for my workflow to use the YUI loader filter configuration property:

基于Eric的回答,我发现我的工作流程使用YUI加载器过滤器配置属性很方便:

filter: { 
          'searchExp': "events-min\\.js", 
          'replaceStr': "events-debug.js"
      }

and just load the debug file that I'm interested in.

然后加载我感兴趣的调试文件。