1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00
joplin/packages/lib/services/BaseService.ts

18 lines
412 B
TypeScript
Raw Normal View History

2020-11-05 18:58:23 +02:00
import Logger from '../Logger';
export default class BaseService {
public static logger_: Logger = null;
protected instanceLogger_: Logger = null;
public logger(): Logger {
if (this.instanceLogger_) return this.instanceLogger_;
if (!BaseService.logger_) throw new Error('BaseService.logger_ not set!!');
return BaseService.logger_;
}
public setLogger(v: Logger) {
this.instanceLogger_ = v;
}
}