How to configure console logging with the outbound Kafka connector

How to configure console logging with the outbound Kafka connector

Context

The outbound Kafka connector has a logging configuration parameter that takes a file argument to define a location where logs are written. In environments such as Kubernetes it may be preferable to capture all service logs to standard output rather than an individual log file.

Method

The method to do this is simply to remove the logging parameter as shown below. The logging parameter would normally reside between format and producer-props. Log entries will then be automatically sent to the console.

service:
  port: 8080

producer-props:
  bootstrap.servers:
    - 192.168.5.20:9092
    - 192.168.5.30:9092


format:
  mode: json

Example output is as follows:

root@34da6dfc660c:/opt/aerospike-kafka-outbound/bin$ ./aerospike-kafka-outbound -f /etc/aerospike-kafka-outbound/aerospike-kafka-outbound.yml
2020-08-06 12:07:26.762 GMT INFO  server - Aerospike Connect [N/A]
2020-08-06 12:07:26.768 GMT INFO  server - started

Notes

Keywords

OUTBOUND KAFKA LOGGING CONSOLE KUBERNETES

Timestamp

August 2020

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.