- Orda Logger is a very tiny logger written in TypeScript, which is used in Orda-js project.
- The size of Orda-logger is about 4KB.
$ npm i @orda-io/orda-logger
You can use orda-logger as follows:
const logFactory = new OrdaLoggerFactory("trace");
const logger = logFactory.getLogger("test logging");
logger.trace("trace message");
logger.debug("debug message");
const num = 1234;
logger.info(`info message:${num}`);
logger.warn("warn message");
try {
generate_error();
} catch (e) {
logger.error("error message", e);
}
logger.log("log withPos back");
- For nodejs, logging messages accompany by the file positions and the tags.
- In the chrome console, logging messages accompany only by the tags.