From 0da42768385397f63f4a98b33608e97e145a05a5 Mon Sep 17 00:00:00 2001
From: Christophe Matthieu <chm@odoo.com>
Date: Fri, 20 Jun 2014 10:53:07 +0200
Subject: [PATCH] [IMP] tour.js: improve log messages

---
 addons/web/static/src/js/tour.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/addons/web/static/src/js/tour.js b/addons/web/static/src/js/tour.js
index 08cbd9d94607..4e013b3616e1 100644
--- a/addons/web/static/src/js/tour.js
+++ b/addons/web/static/src/js/tour.js
@@ -78,12 +78,12 @@ var Tour = {
         this.time = new Date().getTime();
         if (tour.path && !window.location.href.match(new RegExp("("+Tour.getLang()+")?"+tour.path+"#?$", "i"))) {
             var href = Tour.getLang()+tour.path;
-            console.log("Tour Begin from run method (redirection to "+href+")");
+            console.log("Tour '"+tour_id+"' Begin from run method (redirection to "+href+")");
             Tour.saveState(tour.id, mode || tour.mode, -1, 0);
             $(document).one("ajaxStop", Tour.running);
             window.location.href = href;
         } else {
-            console.log("Tour Begin from run method");
+            console.log("Tour '"+tour_id+"' Begin from run method");
             Tour.saveState(tour.id, mode || tour.mode, 0, 0);
             Tour.running();
         }
@@ -304,7 +304,7 @@ var Tour = {
                 "step_id": 0
             };
             window.location.hash = "";
-            console.log("Tour Begin from url hash");
+            console.log("Tour '"+state.id+"' Begin from url hash");
             Tour.saveState(state.id, state.mode, state.step_id, 0);
         }
         if (!state.id) {
@@ -433,7 +433,7 @@ var Tour = {
         Tour.saveState(state.id, state.mode, step.id, state.number);
 
         if (step.id !== state.step_id) {
-            console.log("Tour Step: '" + (step._title || step.title) + "' (" + (new Date().getTime() - this.time) + "ms)");
+            console.log("Tour '"+state.id+"' Step: '" + (step._title || step.title) + "' (" + (new Date().getTime() - this.time) + "ms)");
         }
 
         Tour.autoTogglePopover(true);
@@ -465,8 +465,10 @@ var Tour = {
         var test = state.step.id >= state.tour.steps.length-1;
         Tour.reset();
         if (test) {
+            console.log("Tour '"+state.id+"' finish: ok");
             console.log('ok');
         } else {
+            console.log("Tour '"+state.id+"' finish: error");
             console.log('error');
         }
     },
-- 
GitLab