(log)
| 58694 | var LOG_LEVEL_INFO = 4; |
| 58695 | var LOG_LEVEL_DRAW = 2; |
| 58696 | var getLoggers = function getLoggers(log) { |
| 58697 | return { |
| 58698 | "layer.changeFlag": function layerChangeFlag(layer, key, flags) { |
| 58699 | log.log(LOG_LEVEL_UPDATE_DETAIL, "".concat(layer.id, " ").concat(key, ": "), flags[key])(); |
| 58700 | }, |
| 58701 | "layer.initialize": function layerInitialize(layer) { |
| 58702 | log.log(LOG_LEVEL_MAJOR_UPDATE, "Initializing ".concat(layer))(); |
| 58703 | }, |
| 58704 | "layer.update": function layerUpdate(layer, needsUpdate) { |
| 58705 | if (needsUpdate) { |
| 58706 | var flags = layer.getChangeFlags(); |
| 58707 | log.log(LOG_LEVEL_MINOR_UPDATE, "Updating ".concat(layer, " because: ").concat(Object.keys(flags).filter(function(key) { |
| 58708 | return flags[key]; |
| 58709 | }).join(", ")))(); |
| 58710 | } else log.log(LOG_LEVEL_INFO, "".concat(layer, " does not need update"))(); |
| 58711 | }, |
| 58712 | "layer.matched": function layerMatched(layer, changed) { |
| 58713 | if (changed) log.log(LOG_LEVEL_INFO, "Matched ".concat(layer, ", state transfered"))(); |
| 58714 | }, |
| 58715 | "layer.finalize": function layerFinalize(layer) { |
| 58716 | log.log(LOG_LEVEL_MAJOR_UPDATE, "Finalizing ".concat(layer))(); |
| 58717 | }, |
| 58718 | "compositeLayer.renderLayers": function compositeLayerRenderLayers(layer, updated, subLayers) { |
| 58719 | if (updated) log.log(LOG_LEVEL_MINOR_UPDATE, "Composite layer rendered new subLayers ".concat(layer), subLayers)(); |
| 58720 | else log.log(LOG_LEVEL_INFO, "Composite layer reused subLayers ".concat(layer), subLayers)(); |
| 58721 | }, |
| 58722 | "layerManager.setLayers": function layerManagerSetLayers(layerManager, updated, layers) { |
| 58723 | if (updated) log.log(LOG_LEVEL_MINOR_UPDATE, "Updating ".concat(layers.length, " deck layers"))(); |
| 58724 | }, |
| 58725 | "layerManager.activateViewport": function layerManagerActivateViewport(layerManager, viewport) { |
| 58726 | log.log(LOG_LEVEL_UPDATE_DETAIL, "Viewport changed", viewport)(); |
| 58727 | }, |
| 58728 | "attributeManager.invalidate": function attributeManagerInvalidate(attributeManager, trigger, attributeNames) { |
| 58729 | log.log(LOG_LEVEL_MAJOR_UPDATE, attributeNames ? "invalidated attributes ".concat(attributeNames, " (").concat(trigger, ") for ").concat(attributeManager.id) : "invalidated all attributes for ".concat(attributeManager.id))(); |
| 58730 | }, |
| 58731 | "attributeManager.updateStart": function attributeManagerUpdateStart(attributeManager) { |
| 58732 | logState.attributeUpdateMessages.length = 0; |
| 58733 | logState.attributeManagerUpdateStart = Date.now(); |
| 58734 | }, |
| 58735 | "attributeManager.updateEnd": function attributeManagerUpdateEnd(attributeManager, numInstances) { |
| 58736 | var timeMs = Math.round(Date.now() - logState.attributeManagerUpdateStart); |
| 58737 | log.groupCollapsed(LOG_LEVEL_MINOR_UPDATE, "Updated attributes for ".concat(numInstances, " instances in ").concat(attributeManager.id, " in ").concat(timeMs, "ms"))(); |
| 58738 | var _iterator = _createForOfIteratorHelper(logState.attributeUpdateMessages), _step; |
| 58739 | try { |
| 58740 | for(_iterator.s(); !(_step = _iterator.n()).done;){ |
| 58741 | var updateMessage = _step.value; |
| 58742 | log.log(LOG_LEVEL_UPDATE_DETAIL, updateMessage)(); |
| 58743 | } |
| 58744 | } catch (err) { |
| 58745 | _iterator.e(err); |
| 58746 | } finally{ |
| 58747 | _iterator.f(); |
| 58748 | } |
| 58749 | log.groupEnd(LOG_LEVEL_MINOR_UPDATE)(); |
| 58750 | }, |
| 58751 | "attribute.updateStart": function attributeUpdateStart(attribute) { |
| 58752 | logState.attributeUpdateStart = Date.now(); |
| 58753 | }, |
nothing calls this directly
no test coverage detected