From 0fe107a55a71feeb3a9b655ac914700b6a056b62 Mon Sep 17 00:00:00 2001
From: netpro2k <netpro2k@gmail.com>
Date: Thu, 29 Mar 2018 17:31:00 -0700
Subject: [PATCH] Add support for naming lifecycle-checkers

---
 src/components/debug.js | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/components/debug.js b/src/components/debug.js
index 77202f032..6448bf236 100644
--- a/src/components/debug.js
+++ b/src/components/debug.js
@@ -1,25 +1,30 @@
 AFRAME.registerComponent("lifecycle-checker", {
   schema: {
+    name: { type: "string" },
     tick: { default: false }
   },
   init: function() {
-    console.log("init", this.el);
+    this.log("init");
   },
   update: function() {
-    console.log("update", this.el);
+    this.log("update");
   },
   tick: function() {
     if (this.data.tick) {
-      console.log("tick", this.el);
+      this.log("tick");
     }
   },
   remove: function() {
-    console.log("remove", this.el);
+    this.log("remove");
   },
   pause: function() {
-    console.log("pause", this.el);
+    this.log("pause");
   },
   play: function() {
-    console.log("play", this.el);
+    this.log("play");
+  },
+
+  log: function(method) {
+    console.info(`lifecycle-checker:${this.data.name} ${method}`);
   }
 });
-- 
GitLab