Skip to content

Commit

Permalink
Tidy up log calls in event
Browse files Browse the repository at this point in the history
This reduces the category of some noisy log events, adds a category to
those missing one, and removes a number of commented-out calls.
  • Loading branch information
andrewnicols committed Feb 3, 2014
1 parent 493eef6 commit b4cd123
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions src/event/js/event-dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ Event._interval = setInterval(Event._poll, Event.POLL_INTERVAL);

var a = Y.Array(id), i, availHandle;

// Y.log('onAvailable registered for: ' + id);

for (i=0; i<a.length; i=i+1) {
_avail.push({
id: a[i],
Expand Down Expand Up @@ -387,8 +385,7 @@ Event._interval = setInterval(Event._poll, Event.POLL_INTERVAL);
}

if (!fn || !fn.call) {
// throw new TypeError(type + " attach call failed, callback undefined");
Y.log(type + " attach call failed, invalid callback", "error", "event");
Y.log(type + " attach call failed, invalid callback", "error", "event");
return false;
}

Expand Down Expand Up @@ -440,9 +437,7 @@ Y.log(type + " attach call failed, invalid callback", "error", "event");
// Not found = defer adding the event until the element is available
} else {

// Y.log(el + ' not found');
ret = Event.onAvailable(el, function() {
// Y.log('lazy attach: ' + args);

ret.handle = Event._attach(args, conf);

Expand Down Expand Up @@ -632,7 +627,6 @@ Y.log(type + " attach call failed, invalid callback", "error", "event");
*/
_load: function(e) {
if (!_loadComplete) {
// Y.log('Load Complete', 'info', 'event');
_loadComplete = true;

// Just in case DOMReady did not go off for some reason
Expand Down Expand Up @@ -672,7 +666,6 @@ Y.log(type + " attach call failed, invalid callback", "error", "event");

Event.locked = true;

// Y.log.debug("poll");
// keep trying until after the page is loaded. We need to
// check the page load state prior to trying to bind the
// elements so that we can be certain all elements have been
Expand Down Expand Up @@ -719,11 +712,9 @@ Y.log(type + " attach call failed, invalid callback", "error", "event");
el = (item.compat) ? Y.DOM.byId(item.id) : Y.Selector.query(item.id, null, true);

if (el) {
// Y.log('avail: ' + el);
executeItem(el, item);
_avail[i] = null;
} else {
// Y.log('NOT avail: ' + el);
notAvail.push(item);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/event/js/event-facade-dom-touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Y.DOMEventFacade.prototype._touch = function(e, currentTarget, wrapper) {

var i,l, etCached, et,touchCache;

Y.log("Calling facade._touch() with e = " + e, "info", "event-touch");
Y.log("Calling facade._touch() with e = " + e, "debug", "event-touch");

if (e.touches) {
Y.log("Found e.touches. Replicating on facade");
Y.log("Found e.touches. Replicating on facade", "info", "event-touch");

/**
* Array of individual touch events for touch points that are still in
Expand Down

0 comments on commit b4cd123

Please sign in to comment.