[PD:log:ErrInitLogger] unrecognized level: "CRITICAL"

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: [PD:log:ErrInitLogger]unrecognized level: "CRITICAL"

| username: Kongdom

[Test Environment] TiDB
[TiDB Version] v5.0.0
[Reproduction Path]

Refer to the documentation and set the PD log level to CRITICAL

Has anyone using version 5.0.0 verified this?

[Encountered Problem: Symptoms and Impact]

PD node startup error:
Jul 25 14:03:16 localhost run_pd.sh: [2023/07/25 14:03:16.890 +08:00] [FATAL] [main.go:71] [“initialize logger error”] [error=“[PD:log:ErrInitLogger]unrecognized level: "CRITICAL"”] [stack=“github.com/pingcap/log.Fatal\n\t/go/pkg/mod/github.com/pingcap/log@v0.0.0-20210317133921-96f4fcab92a4/global.go:62\nmain.main\n\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/pd/cmd/pd-server/main.go:71\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203”]

| username: cassblanca | Original post link

It depends on how you wrote your configuration file.

| username: Kongdom | Original post link

pd:
  log.level: CRITICAL
| username: cassblanca | Original post link

It seems that the official documentation does not support the critical level, and the error message also indicates that it is not supported.

| username: Kongdom | Original post link

Where did you see that? Look at the screenshot I posted; the documentation shows that it is supported.

| username: cassblanca | Original post link

PD Configuration Parameters | PingCAP Documentation Center

| username: Kongdom | Original post link

:thinking: This is a command line parameter, not a configuration file parameter. I’m talking about configuration file parameters.

| username: tidb菜鸟一只 | Original post link

SET config pd log.level=‘warning’;
Why not just try modifying it directly? My version 5.4 doesn’t support CRITICAL.

| username: Kongdom | Original post link

I tried it, but it doesn’t support it, so I think there’s a conflict between this and the documentation. :wink: I’ll turn it into a documentation suggestion.

| username: Kongdom | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.