abby-client
Version:
[](https://coveralls.io/github/GreetzNL/abby-client) [](https://tra
32 lines (24 loc) • 508 B
JavaScript
class Logger {
constructor(transport = console) {
this.transport = transport;
}
transport(logger) {
this.transport = logger;
}
warn(data) {
this.transport.warn(data);
}
log(data) {
this.transport.log(data);
}
debug(data) {
this.transport.debug(data);
}
error(data) {
this.transport.error(data);
}
static instance(logger = console) {
return new Logger(logger);
}
}
module.exports = Logger;