This package has been deprecated

Author message:

@elastic/elasticsearch do not need a logging adapter, therefore this package is no longer maintained

slf4ts-elasticsearch-log-adapter
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

slf4ts-elasticsearch-log-adapter

elasticsearch client Logging-Adapter for slf4ts

NPM Version License Dependencies Status

This project is a log adapter using slf4ts logger implementation.
It's meant to be used with nodejs.

Usage

import { ILoggerInstance, LoggerFactory } from "slf4ts-api";
 
// create an instance of elasticsearch client and an instance of the logging adapter for that client
// creates/uses a logger with group "elasticsearch"
const client = new Client({ log: new ElasticsearchLogAdapter().newLogger() });
 
const logger: ILoggerInstance = LoggerFactory.getLogger("my-elasticsearch");
// create an instance of elasticsearch client and an instance of the logging adapter with a pre-created logger instance
const client = new Client({ log: new ElasticsearchLogAdapter().newLogger(logger) });
 
// access the underlying logger instance
const logger: ILoggerInstance = LoggerFactory.getLogger("elasticsearch");
logger.setLogLevel(...);

License

MIT

Package Sidebar

Install

npm i slf4ts-elasticsearch-log-adapter

Weekly Downloads

1

Version

1.1.5

License

MIT

Unpacked Size

12.3 kB

Total Files

12

Last publish

Collaborators

  • rstiller