feat(core): update index generation
This commit is contained in:
@ -62,7 +62,7 @@ export class ElasticLog<T> {
|
||||
log(logObject: IStandardLogParams) {
|
||||
const now = new Date()
|
||||
this.client.index({
|
||||
index: `logs-${now.getFullYear()}.${now.getMonth() + 1}.${now.getDate()}`,
|
||||
index: `logs-${now.getFullYear()}.${("0" + (now.getMonth() + 1)).slice(-2)}.${now.getDate()}`,
|
||||
type: 'log',
|
||||
body: {
|
||||
'@timestamp': now.toISOString(),
|
||||
|
@ -1,4 +1,6 @@
|
||||
const removeme = {};
|
||||
import * as elasticsearch from 'elasticsearch';
|
||||
import * as smartdelay from 'smartdelay';
|
||||
export {
|
||||
removeme
|
||||
elasticsearch,
|
||||
smartdelay
|
||||
}
|
||||
|
Reference in New Issue
Block a user