Compare commits

...

4 Commits

Author SHA1 Message Date
cc7eb8c139 1.0.28 2019-11-03 00:47:19 +01:00
0e01ecbd1a fix(core): update 2019-11-03 00:47:18 +01:00
2d21b40a76 1.0.27 2019-11-02 01:42:04 +01:00
2d1a5cdc50 fix(core): update 2019-11-02 01:42:03 +01:00
4 changed files with 1157 additions and 651 deletions

1761
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "@mojoio/elasticsearch",
"version": "1.0.26",
"version": "1.0.28",
"private": false,
"description": "log to elasticsearch in a kibana compatible format",
"main": "dist/index.js",
@ -13,22 +13,22 @@
"build": "(tsbuild)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tsrun": "^1.1.13",
"@gitzone/tstest": "^1.0.15",
"@pushrocks/qenv": "^2.0.2",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.12.2",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0"
"@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.28",
"@pushrocks/qenv": "^4.0.6",
"@pushrocks/tapbundle": "^3.0.13",
"@types/node": "^12.12.5",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/lik": "^3.0.2",
"@pushrocks/smartdelay": "^2.0.2",
"@pushrocks/smartlog-interfaces": "^2.0.2",
"@pushrocks/smartpromise": "^2.0.5",
"@pushrocks/smarttime": "^3.0.2",
"@types/elasticsearch": "^5.0.28",
"elasticsearch": "^15.2.0"
"@pushrocks/lik": "^3.0.11",
"@pushrocks/smartdelay": "^2.0.3",
"@pushrocks/smartlog-interfaces": "^2.0.9",
"@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smarttime": "^3.0.12",
"@types/elasticsearch": "^5.0.35",
"elasticsearch": "^16.5.0"
}
}

View File

@ -10,11 +10,9 @@ tap.test('first test', async () => {
testElasticLog = new elasticsearch.ElasticSearch({
indexPrefix: 'smartlog',
indexRetention: 7,
domain: process.env.ELK_DOMAIN,
port: parseInt(process.env.ELK_PORT, 10),
ssl: true,
user: process.env.ELK_USER,
pass: process.env.ELK_PASS
domain: testQenv.getEnvVarOnDemand('ELK_DOMAIN'),
port: parseInt(testQenv.getEnvVarOnDemand('ELK_PORT'), 10),
ssl: true
});
expect(testElasticLog).to.be.instanceOf(elasticsearch.ElasticSearch);
});
@ -32,7 +30,7 @@ tap.test('should send a message to Elasticsearch', async () => {
runtime: 'node',
zone: 'ship.zone'
},
message: 'hi, this is a testMessage'
message: 'GET https://myroute.to.a.cool.destination/sorare?hello=there'
});
});

View File

@ -35,7 +35,7 @@ export class ElasticSearch<T> {
*/
constructor(optionsArg: IElasticSearchConstructorOptions) {
this.client = new ElasticClient({
host: this.computeHostString(optionsArg)
host: this.computeHostString(optionsArg),
// log: 'trace'
});
this.indexPrefix = optionsArg.indexPrefix;
@ -56,6 +56,7 @@ export class ElasticSearch<T> {
} else {
hostString = `http://${hostString}`;
}
console.log(hostString);
return hostString;
}