How to change the Log Level on the vFunction Server Containers
Overview of the Issue
The vFunction Server’s Container logs are zipped on a daily basis and purged on a monthly basis. In some cases even with these automations in place, the logs may write information to a level that takes more disk space than the Host can support. In that case, adjust the Log Level of the vFunction Container(s) that is writing the largest log files.
Change the Log Level
Take the following steps to change the Log Level of the Container on the vFunction Server:
- SSH to the Linux Host
- Open the Custom Environment Variables file specific to the type of Container you need to modify:
# Sudo
- Mysql: /etc/sysconfig/vfunction/mysql/automated-custom-env.list
- Nginx: /etc/sysconfig/vfunction/nginx/automated-custom-env.list
- Vfapi: /etc/sysconfig/vfunction/vfapi/automated-custom-env.list
# Sudoless
- Mysql: $BASE_DIR/vfunction/etc/sysconfig/vfunction/mysql/automated-custom-env.list
- Nginx: $BASE_DIR/vfunction/etc/sysconfig/vfunction/nginx/automated-custom-env.list
- Vfapi: $BASE_DIR/vfunction/etc/sysconfig/vfunction/vfapi/automated-custom-env.list
- Add the desired LOG_LEVEL to the file
CLIENT_ID=XXXX
LOG_LEVEL=INFO
- Upgrade the vFunction Server to apply the LOG_LEVEL changes
# sudo
sudo bash /opt/vfunction/server-installation/upgrade.sh
# sudoless
bash $BASE_DIR/vfunction/opt/vfunction/server-installation/upgrade.sh