Class SlowOperationConfig.Builder
java.lang.Object
cloud.opencode.base.log.perf.SlowOperationConfig.Builder
- Enclosing class:
SlowOperationConfig
Builder for SlowOperationConfig.
SlowOperationConfig 的构建器。
- Since:
- JDK 25, opencode-base-log V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configuration.disabled()Disables slow operation detection.enabled()Enables slow operation detection.includeStackTrace(boolean include) Sets whether to include stack trace.Sets the log level.Sets the threshold.thresholdMillis(long millis) Sets the threshold in milliseconds.
-
Method Details
-
threshold
Sets the threshold. 设置阈值。- Parameters:
threshold- the threshold - 阈值- Returns:
- this builder - 此构建器
-
thresholdMillis
Sets the threshold in milliseconds. 设置毫秒阈值。- Parameters:
millis- the threshold in milliseconds - 毫秒阈值- Returns:
- this builder - 此构建器
-
logLevel
Sets the log level. 设置日志级别。- Parameters:
logLevel- the log level - 日志级别- Returns:
- this builder - 此构建器
-
includeStackTrace
Sets whether to include stack trace. 设置是否包含堆栈跟踪。- Parameters:
include- true to include - 如果包含则为 true- Returns:
- this builder - 此构建器
-
enabled
Enables slow operation detection. 启用慢操作检测。- Returns:
- this builder - 此构建器
-
disabled
Disables slow operation detection. 禁用慢操作检测。- Returns:
- this builder - 此构建器
-
build
-