Skip to content

Commit e2e68a1

Browse files
Gardening
Mostly tech-debt errors carried over from earlier versions of this doc.
1 parent f77d9e4 commit e2e68a1

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

modules/howtos/pages/collecting-information-and-logging.adoc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The Couchbase Java SDK logs events and also provides an event bus that transmits
1111

1212
== Logging
1313

14-
The Couchbase Java SDK uses https://www.slf4j.org[SLF4J], a logging facade that lets you use any logging framework that has an SLF4J binding.
14+
The Couchbase Java SDK uses https://www.slf4j.org[SLF4J], a logging façade that lets you use any logging framework that has an SLF4J binding.
1515
This includes popular Java logging frameworks like Log4j, Logback, and `java.util.logging` (JUL).
1616

1717
To see log messages from the Couchbase SDK, add an SLF4J binding as a dependency of your project.
@@ -195,7 +195,8 @@ Dedicated logging frameworks like Log4j 2 and Logback are more configurable, and
195195
[NOTE]
196196
.Event Bus Stability
197197
====
198-
While the event bus functionality itself is considered stable, the events itself may not be. Please only consume the events you are interested in, and add error handling code in case of unexpected behaviour.
198+
While the event bus functionality itself is considered stable, the events themselves may not be.
199+
Please only consume the events you are interested in, and add error handling code in case of unexpected behavior.
199200
====
200201

201202
Log files are neither fun to wade through, nor do they have any kind of real-time aspect.
@@ -204,7 +205,8 @@ Since most setups interleave all different kinds of log messages, it makes it ve
204205

205206
To make the situation better and ultimately improve supportability, the Java SDK provides you with the ability to tap into all events before they get logged and consume them in "real-time".
206207

207-
You can subscribe to the event bus, and receive and react to events as they are happening; not when someone parses the logs, sends them into another system where an alarm is triggered, and eventually a sysadmin checks what iss going on.
208+
You can subscribe to the event bus, and receive and react to events as they are happening;
209+
not when someone parses the logs, sends them into another system where an alarm is triggered, and eventually a sysadmin checks what is going on.
208210
The time delta between an event happening and reacting to it can thus be substantially decreased.
209211

210212
The following code subscribes to the event bus and prints out all events that are published on it with INFO or WARN level:
@@ -224,12 +226,14 @@ NodeConnectedEvent{severity=INFO, category=com.couchbase.node, duration=PT0S, cr
224226
BucketOpenedEvent{severity=INFO, category=com.couchbase.core, duration=PT0.281625729S, createdAt=43701036027888, description=Opened bucket "travel-sample", context=CoreContext{coreId=1}, cause=null}
225227
----
226228

227-
We recommend filtering on the specific events you are interested in, since most of the time only a subset of the published ones will be of use to you. Also, there are new events added between releases so make sure these new events do not break your functionality.
229+
We recommend filtering on the specific events you are interested in, since most of the time only a subset of the published ones will be of use to you.
230+
Also, there are new events added between releases so make sure these new events do not break your functionality.
228231

229232
[WARNING]
230233
.Blocking Warning
231234
====
232-
If you consume the `EventBus` you MUST NOT block inside the consumer callback. It will stall all other consumers. If you must write into a blocking sink like a blocking HTTP API you MUST write it onto a different thread with a non-blocking queue first.
235+
If you consume the `EventBus` you MUST NOT block inside the consumer callback. It will stall all other consumers.
236+
If you must write into a blocking sink like a blocking HTTP API you MUST write it onto a different thread with a non-blocking queue first.
233237
====
234238

235239

@@ -246,6 +250,6 @@ include::example$CollectingInformationAndLogging.java[tag=collecting_information
246250
Different redaction levels are supported -- please see the `RedactionLevel` enum description for more information.
247251

248252
Note that you need to run this command before any of the SDK code is initialized so all of the logs are captured properly.
249-
Once the SDK writes the logs with the tags to a file, you can then use the xref:7.1@server:cli:cbcli/cblogredaction.adoc[`cblogredaction` tool] to obfuscate the log.
253+
Once the SDK writes the logs with the tags to a file, you can then use the xref:7.2@server:cli:cbcli/cblogredaction.adoc[`cblogredaction` tool] to obfuscate the log.
250254

251-
* You may wish to read more on Log Redaction xref:7.1@server:manage:manage-logging/manage-logging.adoc#understanding_redaction[in the Server docs].
255+
* You may wish to read more on Log Redaction xref:7.2@server:manage:manage-logging/manage-logging.adoc#understanding_redaction[in the Server docs].

0 commit comments

Comments
 (0)