1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2025-01-04 08:18:44 +00:00
code-server-2/packages/logger/src/logger.test.ts
2019-02-05 11:15:42 -06:00

17 lines
619 B
TypeScript

import { field, logger, BrowserFormatter, Time } from "./logger";
describe("Logger", () => {
it("should use server formatter", () => {
logger.info("test", field("key", "value"), field("time", new Time(100, Date.now())));
logger.named("name").debug("test name");
logger.named("another name").warn("another test name");
});
it("should use browser formatter", () => {
logger.formatter = new BrowserFormatter();
logger.info("test", field("key", "value"), field("time", new Time(100, Date.now())));
logger.named("name").debug("test name");
logger.named("another name").warn("another test name");
});
});