fix(winston): remove winston

This commit is contained in:
Philipp Kunz 2018-01-29 19:18:36 +01:00
parent 6e0a08c414
commit 4defa4f61d
6 changed files with 3 additions and 62 deletions

View File

@ -73,4 +73,4 @@ class ElasticLog {
}
}
exports.ElasticLog = ElasticLog;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxhc3RpY2xvZy5jbGFzc2VzLmVsYXN0aWNsb2cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9lbGFzdGljbG9nLmNsYXNzZXMuZWxhc3RpY2xvZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBRUEsYUFBYTtBQUNiLGlEQUF3RDtBQUd4RCxnQkFBZ0I7QUFDaEIsdUZBQWlFO0FBd0JqRTtJQUtFOzs7T0FHRztJQUNILFlBQVksVUFBeUM7UUFOckQsaUJBQVksR0FBRyxJQUFJLDhDQUFZLENBQUMsSUFBSSxDQUFDLENBQUM7UUFPcEMsSUFBSSxDQUFDLFVBQVUsR0FBRyxVQUFVLENBQUMsVUFBVSxDQUFDO1FBQ3hDLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxzQkFBYSxDQUFDO1lBQzlCLElBQUksRUFBRSxJQUFJLENBQUMsaUJBQWlCLENBQUMsVUFBVSxDQUFDO1lBQ3hDLEdBQUcsRUFBRSxPQUFPO1NBQ2IsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUVEOzs7T0FHRztJQUNLLGlCQUFpQixDQUFDLFVBQXlDO1FBQ2pFLElBQUksVUFBVSxHQUFHLEdBQUcsVUFBVSxDQUFDLE1BQU0sSUFBSSxVQUFVLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDM0QsRUFBRSxDQUFDLENBQUMsVUFBVSxDQUFDLElBQUksSUFBSSxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztZQUN2QyxVQUFVLEdBQUcsR0FBRyx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FBWSxDQUFDLFNBQVMsQ0FBQyxDQUFDO2dCQUM1QyxDQUFDO2dCQUFDLElBQUksQ0FBQyxDQUFDO29CQUNOLE9BQU8sQ0FBQyxHQUFHLENBQUMsZUFBZSxTQUFTLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQztnQkFDbEQsQ0FBQztZQUNILENBQUMsQ0FDRixDQUFDO1FBQ0osQ0FBQztLQUFBO0NBQ0Y7QUFqRUQsZ0NBaUVDIn0=

View File

@ -1,11 +0,0 @@
import { Transport } from "winston-transport";
import { ElasticLog, IElasticLogConstructorOptions } from "./elasticlog.classes.elasticlog";
export interface IWinstonStandardLogParams {
message: string;
level: string;
}
export declare class ElasticWinstonTransport extends Transport {
client: ElasticLog<any>;
constructor(optsArg: IElasticLogConstructorOptions);
log(info: any, callback: any): void;
}

View File

@ -1,19 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const winston_transport_1 = require("winston-transport");
const elasticlog_classes_elasticlog_1 = require("./elasticlog.classes.elasticlog");
class ElasticWinstonTransport extends winston_transport_1.Transport {
constructor(optsArg) {
super(optsArg);
this.client = new elasticlog_classes_elasticlog_1.ElasticLog(optsArg);
}
log(info, callback) {
this.client.log({
severity: info.level,
message: info.message,
});
callback();
}
}
exports.ElasticWinstonTransport = ElasticWinstonTransport;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxhc3RpY2xvZy5jbGFzc2VzLndpbnN0b250cmFuc3BvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9lbGFzdGljbG9nLmNsYXNzZXMud2luc3RvbnRyYW5zcG9ydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlEQUE4QztBQUM5QyxtRkFHeUM7QUFPekMsNkJBQXFDLFNBQVEsNkJBQVM7SUFHcEQsWUFBWSxPQUFzQztRQUNoRCxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUM7UUFDZixJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksMENBQVUsQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUN4QyxDQUFDO0lBRUQsR0FBRyxDQUFDLElBQUksRUFBRSxRQUFRO1FBQ2hCLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDO1lBQ2QsUUFBUSxFQUFFLElBQUksQ0FBQyxLQUFLO1lBQ3BCLE9BQU8sRUFBRSxJQUFJLENBQUMsT0FBTztTQUN0QixDQUFDLENBQUM7UUFDSCxRQUFRLEVBQUUsQ0FBQztJQUNiLENBQUM7Q0FDRjtBQWZELDBEQWVDIn0=

View File

@ -5,7 +5,7 @@
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"author": "Lossless GmbH",
"license": "",
"license": "MIT",
"scripts": {
"test": "(npmts)",
"format": "(gitzone format)"
@ -18,8 +18,7 @@
"dependencies": {
"@types/elasticsearch": "^5.0.19",
"elasticsearch": "^14.0.0",
"smartdelay": "^1.0.4",
"winston-transport": "^3.0.1"
"smartdelay": "^1.0.4"
},
"config": {
"commitizen": {

View File

@ -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";

View File

@ -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();
}
}