system change
This commit is contained in:
parent
2dead1250a
commit
fa92362547
@ -1,19 +1,9 @@
|
|||||||
export type Environment = "local" | "test" | "staging" | "production";
|
|
||||||
|
|
||||||
// interfaces
|
// interfaces
|
||||||
import { Client as ElasticClient } from "elasticsearch";
|
import { Client as ElasticClient } from "elasticsearch";
|
||||||
|
|
||||||
// other classes
|
// other classes
|
||||||
import { LogScheduler } from "./elasticlog.classes.logscheduler";
|
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 {
|
export interface IStandardLogParams {
|
||||||
message: string;
|
message: string;
|
||||||
severity: string;
|
severity: string;
|
||||||
@ -76,6 +66,7 @@ export class ElasticLog<T> {
|
|||||||
type: "log",
|
type: "log",
|
||||||
body: {
|
body: {
|
||||||
"@timestamp": now.toISOString(),
|
"@timestamp": now.toISOString(),
|
||||||
|
zone: this.logContext.zone,
|
||||||
container: this.logContext.containerName,
|
container: this.logContext.containerName,
|
||||||
environment: this.logContext.environment,
|
environment: this.logContext.environment,
|
||||||
severity: logObject.severity,
|
severity: logObject.severity,
|
||||||
|
@ -590,10 +590,6 @@ vinyl@^2.0.1:
|
|||||||
remove-trailing-separator "^1.0.1"
|
remove-trailing-separator "^1.0.1"
|
||||||
replace-ext "^1.0.0"
|
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:
|
word-wrap@^1.0.3:
|
||||||
version "1.2.3"
|
version "1.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
|
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
|
||||||
|
Loading…
Reference in New Issue
Block a user