fix(winston): remove winston
This commit is contained in:
@@ -2,7 +2,6 @@ export type Environment = "local" | "test" | "staging" | "production";
|
||||
|
||||
// interfaces
|
||||
import { Client as ElasticClient } from "elasticsearch";
|
||||
import { IWinstonStandardLogParams } from "./elasticlog.classes.winstontransport";
|
||||
|
||||
// other classes
|
||||
import { LogScheduler } from "./elasticlog.classes.logscheduler";
|
||||
|
@@ -1,27 +0,0 @@
|
||||
import { Transport } from "winston-transport";
|
||||
import {
|
||||
ElasticLog,
|
||||
IElasticLogConstructorOptions
|
||||
} from "./elasticlog.classes.elasticlog";
|
||||
|
||||
export interface IWinstonStandardLogParams {
|
||||
message: string;
|
||||
level: string;
|
||||
}
|
||||
|
||||
export class ElasticWinstonTransport extends Transport {
|
||||
client: ElasticLog<any>;
|
||||
|
||||
constructor(optsArg: IElasticLogConstructorOptions) {
|
||||
super(optsArg);
|
||||
this.client = new ElasticLog(optsArg);
|
||||
}
|
||||
|
||||
log(info, callback) {
|
||||
this.client.log({
|
||||
severity: info.level,
|
||||
message: info.message
|
||||
});
|
||||
callback();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user