Search the VMware Knowledge Base (KB)
View by Article ID

Configuring logging for VMware vCloud Director cells (1026815)

  • 5 Ratings

Purpose

This article discusses 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.

Resolution

Log Locations

  • For vCloud Director version 1.5 and forward, the logs are stored in /opt/vmware/vcloud-director/logs

Configuration File

  • For vCloud Director version 1.5 and forward, the log configuration file is located in /opt/vmware/vcloud-director/etc/. The log configuration file is called log4j.properties.

Logging Levels

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-director/etc/log4j.properties file, VMware recommends that you make a backup copy.
  1. Open the /opt/vmware/vcloud-director/etc/log4j.properties file in a text editor (such as vi or nano).

  2. Locate this section:
    # Root vCloud loggers
    log4j.logger.com.vmware.vcloud=DEBUG
    log4j.logger.com.vmware.ssdc=DEBUG
  3. Replace DEBUG and ERROR with one of the other logging levels. The following example will set vcloud and sddc to TRACE level.

    For example:
    log4j.logger.com.vmware.vcloud=TRACE
    log4j.logger.com.vmware.ssdc=TRACE
  4. Now we need to change how the log file records information. Locate the section starting with:
    # appender for all log requests with level >= DEBUG
  5. The last line of the section configures the level of logging the file will capture. This needs to be changed to match the most verbose level.  In the list of logging levels at the top of this document, TRACE is the most verbose and FATAL is the least verbose.
    log4j.appender.vcloud.system.debug.threshold=TRACE
    
    
  6. If you choose a new logging level that is more verbose, you may need to increase the number of log backups and or the size of the log files.
    1. Locate the lines:

      log4j.appender.vcloud.system.debug.MaxFileSize=
      log4j.appender.vcloud.system.debug.MaxBackupIndex=

    2. Change the default settings.

      This example a
      llows the log files to grow to 25 MB before they will rollover and keeps the last 5 logs:

      log4j.appender.vcloud.system.debug.MaxFileSize=25000KB
      log4j.appender.vcloud.system.debug.MaxBackupIndex=5

  7. Save the file and the settings should be applied immediately.

    Note: There are some additional root loggers that can be added to gather information about specific components of vCloud Director workings. These can be added to the root loggers section, and before the console appender section.

    #Collect logging about the Quartz Scheduler
    log4j.logger.org.quartz.core=DEBUG

Additional Information

For information on collecting the logs, see Collecting diagnostic information for VMware vCloud Director (1026312).

Tags

vcloud-director  vcloud-configuring-logs

See Also

Update History

12/20/2011 - Updated to include version 1.5. 4/5/2013 - Updated to include version 5.1.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 5 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 5 Ratings
Actions
KB: