DESCRIPTION

JVMCBC-228: Implement an Event Logging Consumer

Motivation
----------
For easy access, an event logger should be in place that can be used by the user
to log events which are incoming over the event bus.

Modifications
-------------
A LoggingConsumer has been implemented which consumes the event bus and logs
according to the specified log level and in the confiugred format.

To make things easier, a utility class has been added and all events now support
a versatile toMap() function that converts the objects into simple types. This
is then utilized to convert into a JSON representation if needed.

Also, if you just want to change the emit frequency some overloads have been added
to the configs to make it much simpler to work with.

Result
------
Easy logging of system events either as toString or through JSON.

Change-Id: I58f952010a9e75f0c3842f0a046ac73c095d1667


COMMENTS

author: Natasha Sullivan
date: 2015-07-28 11:32:15.855000000

Uploaded patch set 2: Commit message was updated.

-------------------------------------
author: Natasha Sullivan
date: 2015-07-28 11:36:46.304000000

Patch Set 2: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2015-07-28 12:16:23.622000000

Patch Set 2:

(2 comments)

Line:70, src/main/java/com/couchbase/client/core/event/system/NodeConnectedEvent.java -> I would consider using the same key as in toString ("node") or modify the key in toString to be "host" for consistency

Line:70, src/main/java/com/couchbase/client/core/event/system/NodeDisconnectedEvent.java -> idem, consider using same key ("node") as in toString

-------------------------------------
author: Gerrit Code Review
date: 2015-07-28 14:17:37.298000000

Change has been successfully cherry-picked as b8e38ad3d068ee67de8453076ae8529c3ccf34ff

-------------------------------------
