1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-03 17:08:35 -05:00
denoland-deno/logging/test.ts

30 lines
647 B
TypeScript
Raw Normal View History

2019-01-02 09:12:48 -05:00
import { remove, open, readAll } from "deno";
2019-01-01 22:46:17 -05:00
import { assertEqual, test } from "../testing/mod.ts";
2019-01-02 09:12:48 -05:00
import * as log from "index.ts";
import { FileHandler } from "./handlers.ts";
2018-12-19 13:16:45 -05:00
// TODO: establish something more sophisticated
let testOutput = "";
2019-01-02 09:12:48 -05:00
class TestHandler extends log.handlers.BaseHandler {
constructor(levelName: string) {
super(levelName);
}
log(msg: string) {
testOutput += `${msg}\n`;
2018-12-19 13:16:45 -05:00
}
}
2019-01-02 09:12:48 -05:00
test(function testDefaultlogMethods() {
log.debug("Foobar");
log.info("Foobar");
log.warning("Foobar");
log.error("Foobar");
log.critical("Foobar");
2018-12-19 13:16:45 -05:00
2019-01-02 09:12:48 -05:00
const logger = log.getLogger('');
console.log(logger);
});