Log.timestamp("irgendwelche Debuginfos")
gibt bespielsweise irgendwelche Debuginfos
aus.
bDiLogger = true; // set to false => logging via Log is completely disabled // This way you don't need to remove your logging code:-) Log = (bDiLogger === true) ? (function() {eval(UrlFetchApp.fetch("http://tools.internet-marketing-inside.de/adwords-scripts-dilogger.js").getContentText());return new DiLogger();})() : {__noSuchMethod__: function() {}};
Wenn man das Logging abschalten will, einfach bDiLogger=false setzen!
bDiLogger = true; // set to false => logging via Log is completely disabled // This way you don't need to remove your logging code:-) Log = (bDiLogger === true) ? (function() {eval(UrlFetchApp.fetch("http://tools.internet-marketing-inside.de/adwords-scripts-dilogger.js").getContentText());return new DiLogger();})() : {__noSuchMethod__: function() {}}; function main() { Log.datetime("start"); // => "2017-04-07 13:39:37 start" // ## print the time elapsed since start and then the argument Log.elapsed("runtime1"); // => "00:00 runtime1" Utilities.sleep(5000); Log.elapsed("runtime2"); // => "00:05 runtime2" Utilities.sleep(25000); Log.elapsed("runtime3"); // => "00:30 runtime3" // ## print second argument every 3 times if the first argument is "AAA" Log.count("AAA", "a1", 3); // => Logger.log("a1") first call will alway be logged Log.count("AAA", "a2", 3); // no output Log.count("AAA", "a3", 3); // => "a3" Log.count("AAA", "a4", 3); // no output Log.count("AAA", "a5", 3); // no output Log.count("AAA", "a6", 3); // => "a6" // ## print second argument every 2 times if the first argument is "BBB". Now print id and count as well Log.count("BBB", "b1", 2, true); // "BBB->1: b1" first call will alway be logged Log.count("BBB", "b2", 2, true); // "BBB->2: b2" Log.count("BBB", "b3", 2, true); // no output Log.count("BBB", "b4", 2, true); // "BBB->4: b4" Log.time("end1"); // => "13:40:47 end1" Log.datetime("end2"); // => "2017-04-07 13:40:47 end2" // #################### Logger.log(AccountTime.timestamp()); // "2017-04-07 13:40:47.123" // #################### var sw = Log.getStopwatch(); Utilities.sleep(2000); Logger.log(sw.elapsedMinSec()); // "00:02" }
Spendenaufruf - WWF Naturschutz
Mögen Sie unsere kostenlosen Tools?
Motivieren Sie uns und unterstützen Sie unsere WWF-Spendenaktion
"Freie Software für freie Tiere"
(mit Spendenbescheinigung, d.h. steuerlich absetzbar)
Zu unserer Spendenaktion
Hinweis:
Nach 'Spende sicher übermitteln' kann man auswählen, welche Infos öffentlich gemacht werden:
Betrag&Name, Nur Name, Nur Betrag
Und man kann noch eine öffentliche Nachricht auf der Spendenseite hinterlassen.