diff --git a/ts/elasticlog.classes.elasticlog.ts b/ts/elasticlog.classes.elasticlog.ts index ee04dd0..68a615c 100644 --- a/ts/elasticlog.classes.elasticlog.ts +++ b/ts/elasticlog.classes.elasticlog.ts @@ -1,19 +1,9 @@ -export type Environment = "local" | "test" | "staging" | "production"; - // interfaces import { Client as ElasticClient } from "elasticsearch"; // other classes import { LogScheduler } from "./elasticlog.classes.logscheduler"; -export interface LogContext { - zone?: string; - containerName?: string; - environment: Environment; -} - -export type TLogSeverity = "log" | "info" | "warn" | "error" | "fatal"; - export interface IStandardLogParams { message: string; severity: string; @@ -76,6 +66,7 @@ export class ElasticLog { type: "log", body: { "@timestamp": now.toISOString(), + zone: this.logContext.zone, container: this.logContext.containerName, environment: this.logContext.environment, severity: logObject.severity, diff --git a/yarn.lock b/yarn.lock index 44779b8..a01bbab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -590,10 +590,6 @@ vinyl@^2.0.1: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" -winston-transport@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-3.0.1.tgz#8008b15eef5660c4fb3fa094d58ccbd08528c58d" - word-wrap@^1.0.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"