milvus-docs
milvus-docs copied to clipboard
[QUESTION]: Where to set the log level?
Is your question answered elsewhere?
- [X] searched the existing issues.
- [X] read the documentation.
What is your question?
On the docs, there's a page explaining various settings related to logging. However, there's no instruction about where or how to set those variables. Is log.level
an environment variable? Do I set this on a file? It isn't clear.
Anything else?
No response
The target configuration file (that contains log level settings) is inside milvus container, at /milvus/configs/milvus.yaml
. You can either
- Go inside the container and modify the
milvus.yaml
, or - Write another
milvus.yaml
outside the container, and modifydocker-compose.yml
to mount and map that file.
Assuming you are using milvus-standalone,
- For option 1, you may
- Go inside the container
docker exec -it docker-standalone bash
- Install a text editor
apt update apt install nano
- Edit the file
nano /milvus/configs/milvus.yaml
- Go inside the container
- For option 2, you may
- Write a
milvus.yaml
with log settings:# Configures the system log output. log: level: warn # Only supports debug, info, warn, error, panic, or fatal. Default 'info'. file: rootPath: # root dir path to put logs, default "" means no log file will print. please adjust in embedded Milvus: /tmp/milvus/logs maxSize: 300 # MB maxAge: 10 # Maximum time for log retention in day. maxBackups: 20 format: text # text or json stdout: true # Stdout enable or not
- Open
docker-compose.yml
and locatestandalone.volumes
- Modify
docker-compose.yml
:standalone: ... volumes: ... <full path of milvus.yaml>:/milvus/configs/milvus.yaml ...
- Write a
In addition, you can also change log level during runtime:
curl -X PUT localhost:9091/log/level -d "level=warn" # assuming server is localhost and target level is warn