alibaba / alibaba/Sentinel

It is supposed to log with warn-level instead of info-level

Open
#2,686 2 comments 0 reactions 0 assignees View on GitHub
area/logging kind/discussion
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

### Describe what happened (or what feature you want)

```java
if (flushInterval <= 0) {
RecordLog.info("[FlowRuleManager] The MetricTimerListener isn't started. If you want to start it, "
+ "please change the value(current: {}) of config({}) more than 0 to start it.", flushInterval,
SentinelConfig.METRIC_FLUSH_INTERVAL);
return;
}
```
it is logging with info-level.

### Describe what you expected to happen

There should log with warn-level because if `flushInterval <= 0` there should be a warning.

### How to reproduce it (as minimally and precisely as possible)

1.
2.
3.

### Tell us your environment

### Anything else we need to know?

Contributor guide

Open the contributing guide

Research direction

Start from the FlowRuleManager MetricTimerListener code shown in the issue and inspect the branch where flushInterval is less than or equal to zero. Change the reported log severity to warn-level, then verify that this branch emits a warning with the existing message and arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.