Setting Milvus log level config is not working
I am trying to set milvus log level to "warn"+ (since the proxy node is logging too much in production), but all the config for log level doesn't seem to be working. I wonder if there is other way to set the log level correctly or if I am missing something here.
Also, It will be great to know how to set log level for individual component and dependency.
Tried both below.
...
spec:
mode: cluster
config:
log:
level: warn
...
...
spec:
mode: cluster
config:
milvus:
log:
level: warn
...
Hi @YGao119 , the first one is correct. But it doesn't support dynamic reload. So you need to rollout restart all your milvus deployments to make it work.
Thank you for the quick response. I deploy milvus cluster in k8s, and I created a new cluster with the config directly with kubectl apply.
In the configmap, I can see the log setting
│ apiVersion: v1 │
│ data: │
│ user.yaml: | │
│ dataCoord: │
│ enableActiveStandby: true │
│ etcd: │
│ endpoints: │
│ - jason-test-etcd-0.jason-test-etcd-headless.milvus:2379 │
│ - jason-test-etcd-1.jason-test-etcd-headless.milvus:2379 │
│ rootPath: jason-test │
│ indexCoord: │
│ enableActiveStandby: true │
│ log: │
│ level: warn
and I can still see these logs in all the nodes (querynode, proxy, ...)
│ proxy [2025/05/09 18:14:00.413 +00:00] [DEBUG] [metrics/thread.go:53] ["thread watcher observe thread num"] [threadNum=23] │
│ proxy [2025/05/09 18:14:30.413 +00:00] [DEBUG] [metrics/thread.go:53] ["thread watcher observe thread num"] [threadNum=23] │
│ proxy [2025/05/09 18:15:00.413 +00:00] [DEBUG] [metrics/thread.go:53] ["thread watcher observe thread num"] [threadNum=23] │
│ proxy [2025/05/09 18:15:30.413 +00:00] [DEBUG] [metrics/thread.go:53] ["thread watcher observe thread num"] [threadNum=23] │
I am wondering if I miss anything here.
@YGao119 Your configuration is correctly set. Some code are executed before milvus changes its log level, that's why you may see some output logs of lower level. I'm quite sure it works. If you still worries about it, you can check the actual configs loaded through milvus web UI : https://milvus.io/docs/milvus-webui.md
@haorenfsa It does apply to the configurations as you said. But it seems like this code does not follow the config for some reason and keeps logging
[DEBUG] [metrics/thread.go:53] ["thread watcher observe thread num"] [threadNum=17]
@YGao119 Yes, that's an issue of milvus. Thank you for your feedback! 👍