You can configure the different log files in vCloud Director , their locations, the different logging levels and how to increase the log file sizes and the number of copies to keep.
Increasing the amount of diagnostic data (log file size and the number of logs to keep) may be required to troubleshoot a problem with vCloud Director.
- For vCloud Director 1.0 the logs are stored in /opt/vmware/cloud-director/logs.
- For vCloud Director 1.5 and 5.1 the logs are stored in /opt/vmware/vcloud-director/logs
- For vCloud Director 1.0 the log configuration file is located in /opt/vmware/cloud-director/etc/. The log configuration file is called log4j.properties.
- For vCloud Director 1.5 and 5.1 the log configuration file is located in /opt/vmware/vcloud-director/etc/. The log configuration file is called log4j.properties.
These six logging levels can be defined:
- FATAL – logs very severe error events that may cause the application to fail
- ERROR – logs error events that might still allow the application to continue running
- WARN – logs potentially harmful situations and warnings
- INFO – logs informational messages that highlight the progress of the application at a coarse-grained level
- DEBUG – logs informational events that are most useful to debug an application at a fine-grained level
- TRACE – logs informational events at a level more fine-grained than DEBUG logging
To change the logging level:
Caution: Before making any changes to the /opt/vmware/vcloud-path/etc/log4j.properties file, VMware recommends that you make a backup copy.
- Open the /opt/vmware/vcloud-path/etc/log4j.properties file in a text editor (such as vi or nano).
Where vcloud_path is the path name. In vCloud Director 1.0, it is cloud-director. In vCloud Director 1.5 and 5.1, the path is vcloud-director.
- Locate this section:
- Replace DEBUG and ERROR with one of the other logging levels. Both log4j.* entries should be set to the same logging level.
- To change the log file size and the number of files to keep:
- Locate the lines:
- Change the default settings.
This example allows the log files to grow to 25 MB before they will rollover and keeps the last 5 logs:
- Locate the lines:
- Save the file.
- Restart the vCloud Director Cell with the command:
service vmware-vcd restart