VMware Cloud Director has different logging levels. The default logging configuration might not be sufficient for busy environments or for capturing events whilst troubleshooting. You might need to change the level of logging and even the sizes and number of files retained.
The VMware Cloud Director logs are located in the /opt/vmware/vcloud-director/logs/ directory.
The VMware Cloud Director log configuration file is located in the /opt/vmware/vcloud-director/etc/ directory. The name of the log configuration file is log4j.properties
.
If you customize the log4j.properties
log configuration file, before a VMware Cloud Director upgrade, you must make a copy of the log4j.properties
, and after the upgrade, manually insert any missing sections.
To improve your log retention and to ensure that the VMware Cloud Director logs are kept for a certain amount of time, consider using a syslog server.
Logging Level | Description |
---|---|
FATAL |
FATAL is the least verbose level. This level logs very severe error events that might cause the application to fail. |
ERROR |
This level logs error events that might still allow the application to continue running. |
WARN |
This level logs potentially harmful situations and warnings. |
INFO |
This level logs informational messages that highlight the progress of the application at a coarse-grained level. |
DEBUG |
This level logs informational events that are most useful to debug an application at a fine-grained level. |
TRACE |
TRACE is the most verbose level. This level logs informational events at a more fine-grained level than the DEBUG level logging. |
Prerequisites
Make a backup copy of the /opt/vmware/vcloud-director/etc/log4j.properties file.
Consider
Procedure
Control the API Request Logging in VMware Cloud Director
You can control the process of capturing and storing information about incoming requests in VMware Cloud Director.
VMware Cloud Director logs the incoming requests to the VMware Cloud Director cells in request logs. The logs have names of the form YYYY_MM_DD.request.log
. You can find the VMware Cloud Director request.log files in the /opt/vmware/vcloud-director/logs/ directory, but you cannot configure the logs through the log4j.properties file.
You can use the manage-config subcommand of the command line tool to control the API request logging. The manage-config subcommand changes the settings for the whole server group. For more information about the manage-config subcommand options and arguments, see Updating Application Configuration Settings in VMware Cloud Director.
The log rotation can happen maximum once per day and is not linked to the size of the individual log files or the total size of all log files. You can control the rotation policy by changing the amount of days for which VMware Cloud Director keeps the logs.