Skip to content

Commit a59ea3f

Browse files
committed
Updates based on review.
1 parent 2c62c90 commit a59ea3f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

website/docs/sdk-reference/java.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ These are the available options on the `Options` class:
123123
| `defaultUser(User)` | Optional, sets default user. [More about default user](#default-user). |
124124
| `offline(boolean)` | Optional, defaults to `false`. Indicates whether the SDK should be initialized in offline mode. [More about offline mode](#online--offline-mode). |
125125
| `hooks()` | Optional, used to subscribe events that the SDK sends in specific scenarios. [More about hooks](#hooks). |
126-
| `logFilter(LogFilterFunction)` | Optional, used to set custom log filter implementation. [More about log filter](#log-filter). |
126+
| `logFilter(LogFilterFunction)` | Optional, sets a custom log filter. [More about log filtering](#log-filtering). |
127127

128128
:::caution
129129
We strongly recommend you to use the `ConfigCatClient` as a Singleton object in your application.
@@ -872,18 +872,18 @@ You have the flexibility to use any slf4j implementation for logging with Config
872872
873873
Examples fo <a href="https://github.com/configcat/java-sdk/blob/master/samples/console/src/main/resources/simplelogger.properties" target="_blank">slf4j-simple</a> and <a href="https://github.com/configcat/java-sdk/blob/master/samples/web/src/main/resources/logback.xml" target="_blank">logback</a> are available under the [Sample Apps](#sample-apps) section.
874874
875-
### Log Filter
875+
### Log Filtering
876876
877-
You can set a custom log filter option by implementing the `LogFilterFunction` interface. The `apply` method provide the options to filter by `logLevel`, `eventId`, `message` or `exception`.
878-
If the `apply` method return with `true`, the event will be logged.
877+
You can define a custom log filter option by implementing the `LogFilterFunction` interface. The `apply` method will be called by the _ConfigCat SDK_ each time a log event occurs (and the event passes the minimum log level specified by the `logLevel` option). That is, the `apply` method allows you to filter log events by `logLevel`, `eventId`, `message` or `exception`.
878+
If the `apply` method returns with `true`, the event will be logged, otherwise it will be skipped.
879879
880880
```java
881-
//Filter out the logs with the eventId 1001.
881+
// Filter out events with id 1001 from the log.
882882
LogFilterFunction filterLogFunction = ( LogLevel logLevel, int eventId, String message, Throwable exception) -> eventId != 1001;
883883
884884
ConfigCatClient client = ConfigCatClient.get("#YOUR-SDK-KEY#", options -> options.logFilter(filterLogFunction));
885885
```
886-
> A complex or a badly implemented log filter can affect the SDK efficiency.
886+
> Please make sure that your log filter logic doesn't perform heavy computation and dosen't block the executing thread. A complex or incorrectly implemented log filter can negatively affect the performance of the SDK.
887887
888888
## Sample Apps
889889

0 commit comments

Comments
 (0)