1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-17 18:44:45 +02:00
joplin/packages/lib/services/BaseService.ts
2020-11-05 16:58:23 +00:00

18 lines
387 B
TypeScript

import Logger from '../Logger';
export default class BaseService {
static logger_:Logger = null;
protected instanceLogger_:Logger = null;
logger():Logger {
if (this.instanceLogger_) return this.instanceLogger_;
if (!BaseService.logger_) throw new Error('BaseService.logger_ not set!!');
return BaseService.logger_;
}
setLogger(v:Logger) {
this.instanceLogger_ = v;
}
}