mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
18 lines
423 B
TypeScript
18 lines
423 B
TypeScript
import Logger from '@joplin/utils/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;
|
|
}
|
|
}
|