pxt-ev3/libs/storage/storage.ts

11 lines
349 B
TypeScript
Raw Normal View History

namespace storage {
// automatically send console output to temp storage
storage.temporary.remove("console.txt");
console.addListener(function(line) {
const fn = "console.txt";
const t = control.millis();
storage.temporary.appendLine(fn, `${t}> ${line}`);
storage.temporary.limit(fn, 65536);
})
}