1 /** 2 * @author swiip_mat 3 */ 4 5 /** 6 * This logger is full of breaks. 7 * Can be usefull for step by step or testing on very pour client. 8 * @namespace Archetype.Loggers.AlertLogger 9 */ 10 Archetype.Loggers.AlertLogger = Archetype.Class.singleton({ 11 initialize: function() {}, 12 13 log: function() { 14 var content=$A(arguments).toArray().join(" "); 15 alert(content); 16 }, 17 debug: function() { 18 var content=$A(arguments).toArray().join(" "); 19 alert("[DEBUG] " + content); 20 }, 21 warn: function() { 22 var content=$A(arguments).toArray().join(" "); 23 alert("[WARN] " + content); 24 }, 25 error: function() { 26 var content=$A(arguments).toArray().join(" "); 27 alert("[ERROR] " + content); 28 }, 29 fatal: function() { 30 var content=$A(arguments).toArray().join(" "); 31 alert("[FATAL] " + content); 32 } 33 });