2018-03-01 22:33:47 +01:00
|
|
|
export type TLogLevel = 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly';
|
|
|
|
export type TEnvironment = 'local' | 'test' | 'staging' | 'production';
|
|
|
|
export type TRuntime = 'node' | 'browser';
|
2018-02-08 01:52:08 +01:00
|
|
|
|
|
|
|
export interface ILogContext {
|
|
|
|
zone?: string;
|
|
|
|
company?: string;
|
|
|
|
companyunit?: string;
|
|
|
|
containerName?: string;
|
|
|
|
environment: TEnvironment;
|
|
|
|
runtime: TRuntime;
|
|
|
|
}
|
|
|
|
|
2018-03-01 22:33:47 +01:00
|
|
|
export interface ILogPackage {
|
|
|
|
logContext: ILogContext;
|
2018-03-01 22:50:34 +01:00
|
|
|
logLevel: TLogLevel;
|
2018-03-01 22:33:47 +01:00
|
|
|
message: string;
|
2018-03-01 00:32:21 +01:00
|
|
|
}
|
|
|
|
|
2018-10-31 13:49:12 +01:00
|
|
|
export interface ILogPackageAuthenticated {
|
|
|
|
auth: string;
|
|
|
|
logPackage: ILogPackage;
|
|
|
|
}
|
|
|
|
|
2018-03-01 00:32:21 +01:00
|
|
|
export interface ILogDestination {
|
2018-03-01 23:31:47 +01:00
|
|
|
handleLog: (logPackage: ILogPackage) => void;
|
2018-03-01 22:33:47 +01:00
|
|
|
}
|