21 lines
508 B
TypeScript
21 lines
508 B
TypeScript
import logger, {Level, type Writer, type WriterOptions} from 'log'
|
|
|
|
export * as log from 'log'
|
|
export default logger
|
|
|
|
export class Ntfy implements Writer {
|
|
readonly _options: WriterOptions & { url: string, token?: string };
|
|
|
|
public constructor(options: WriterOptions & { url: string, token?: string }) {
|
|
this._options = options
|
|
}
|
|
|
|
public log(_level: Level, ...data: any[]) : void {
|
|
throw "todo"
|
|
}
|
|
|
|
get options() : WriterOptions {
|
|
return this._options;
|
|
}
|
|
}
|