Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
2a595a1a9a | |||
d62b18e93c |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apiclient.xyz/elasticsearch",
|
"name": "@apiclient.xyz/elasticsearch",
|
||||||
"version": "1.0.43",
|
"version": "1.0.44",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "log to elasticsearch in a kibana compatible format",
|
"description": "log to elasticsearch in a kibana compatible format",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@apiclient.xyz/elasticsearch',
|
name: '@apiclient.xyz/elasticsearch',
|
||||||
version: '1.0.43',
|
version: '1.0.44',
|
||||||
description: 'log to elasticsearch in a kibana compatible format'
|
description: 'log to elasticsearch in a kibana compatible format'
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ export class ElasticIndex {
|
|||||||
|
|
||||||
public async ensureIndex(prefixArg: string, indexNameArg: string) {
|
public async ensureIndex(prefixArg: string, indexNameArg: string) {
|
||||||
if (this.stringmap.checkString(indexNameArg)) {
|
if (this.stringmap.checkString(indexNameArg)) {
|
||||||
return;
|
return indexNameArg;
|
||||||
}
|
}
|
||||||
const responseArg = await this.elasticSearchRef.client.cat.indices({
|
const responseArg = await this.elasticSearchRef.client.cat.indices({
|
||||||
format: 'json',
|
format: 'json',
|
||||||
|
@ -51,8 +51,7 @@ export class ElasticSearch<T> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await this.elasticIndex.ensureIndex(this.indexPrefix, indexToUse);
|
const resultIndexName = await this.elasticIndex.ensureIndex(this.indexPrefix, indexToUse);
|
||||||
console.log(response);
|
|
||||||
this.client.index(
|
this.client.index(
|
||||||
{
|
{
|
||||||
index: indexToUse,
|
index: indexToUse,
|
||||||
|
Reference in New Issue
Block a user