File manager - Edit - /usr/local/lib/node_modules/knex-migrator/node_modules/@tryghost/elasticsearch-bunyan/index.js
Back
const {Client} = require('@elastic/elasticsearch'); const debug = require('debug')('elasticsearch-bunyan'); class ElasticSearch { constructor(clientConfig, indexConfig) { this.client = new Client(clientConfig); this.index = indexConfig; } async write(data) { try { if (typeof data !== 'object') { throw new Error('Type Error: ElasticSearch transport requires log data to be an object'); } await this.client.index({ body: data, ...this.index }); } catch (error) { debug('Failed to ship log', error.message); } } } module.exports = ElasticSearch;
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings