1.2.0 • Published 5 years ago

slf4ts-cassandra-log-adapter v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

slf4ts-cassandra-log-adapter

Cassandra Logging-Adapter for slf4ts

This project forwards log events from datastax cassandra driver to slf4ts logger implementation.
It's s meant to be used with nodejs.

Usage

import { ILoggerInstance, LoggerFactory } from "slf4ts-api";

// create an instance of Client
const client = new Client({ contactPoints: ["127.0.0.1:9042"] });

// Create an instance of the logging adapter for each client
// creates/uses a logger with group "cassandra" and the keyspace of the client as name (empty string if not configured) 
new CassandraLogAdapter(client);

// Create an instance of the logging adapter with a pre-created logger instance
const logger: ILoggerInstance = LoggerFactory.getLogger("my-cassandra");
new CassandraLogAdapter(client, logger);

// use the client as usual
client.connect(() => {
    ...
});

// access the underlying logger instance
const logger: ILoggerInstance = LoggerFactory.getLogger("cassandra", client.keyspace);
logger.setLogLevel(...);

License

MIT

1.2.0

5 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.1

6 years ago

1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

1.0.0-beta.3

8 years ago

1.0.0-beta.2

8 years ago

1.0.0-beta.1

8 years ago