elasticsearch/dist/elasticlog.classes.elasticlog.d.ts

32 lines
930 B
TypeScript
Raw Normal View History

2018-08-12 14:42:09 +00:00
import { Client as ElasticClient } from 'elasticsearch';
import { ILogContext } from 'smartlog-interfaces';
import { LogScheduler } from './elasticlog.classes.logscheduler';
2018-01-24 23:38:07 +00:00
export interface IStandardLogParams {
message: string;
severity: string;
}
export interface IElasticLogConstructorOptions {
port: number;
domain: string;
ssl: boolean;
user?: string;
pass?: string;
2018-08-12 14:42:09 +00:00
logContext: ILogContext;
2018-01-24 23:38:07 +00:00
}
export declare class ElasticLog<T> {
client: ElasticClient;
2018-08-12 14:42:09 +00:00
logContext: ILogContext;
2018-01-24 23:38:07 +00:00
logScheduler: LogScheduler;
/**
* sets up an instance of Elastic log
* @param optionsArg
*/
constructor(optionsArg: IElasticLogConstructorOptions);
/**
* computes the host string from the constructor options
* @param optionsArg
*/
private computeHostString(optionsArg);
2018-01-27 18:16:05 +00:00
log(logObject: IStandardLogParams, scheduleOverwrite?: boolean): Promise<void>;
2018-01-24 23:38:07 +00:00
}