Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 405 Bytes

File metadata and controls

21 lines (15 loc) · 405 Bytes

debug-factory

Factory for creating debug loggers

import DebugFactory from "debug-factory";

const [log, error] = DebugFactory.getDebuggers("MyApp");

log("This is a log");
error("this is a error");

With a custom formatter

const [log, error] = DebugFactory.getDebuggers("Memory", {
  x: (v) => v.toString(16)
});

log("putByte: add:0x%x val:0x%x", address, byte);