Upgrading your logging configuration

About this task

In SDL Tridion 2011, the underlying core product, logging is now configured in a central logging configuration file. Previously, you configured logging for WebForms in the WebForms configuration file; now, you must remove this configuration and instead add elements to the central logging configuration file.

To upgrade your logging configuration, do the following:

Procedure

  1. Access the location of your new WebForms configuration file. Typically, this is in the config/ subdirectory or, if you have a Web application, in the classes/ subdirectory of the Content Delivery root location.
  2. In this location, open the new WebForms configuration file, webforms_conf.xml in a plain-text or XML editor.
  3. Find the Logging element in this file and remove it, then save and close the file.
  4. In the location of your Content Delivery configuration files, typically the same location mentioned before, find a file logback.xml and open it in a plain-text or XML editor.
  5. In this file, add a new appender element to the bottom of the list of existing appender elements and fill it in as follows:
    <appender name="rollingWebFormsLog" 
      class="ch.qos.logback.core.rolling.RollingFileAppender">
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBaseRollingPolicy">
        <fileNamePattern>${log.folder}/cd_webforms.%d{yyyy-MM-dd}.log</fileNamePattern>
        <maxHistory>${log.history}</maxHistory>
      </rollingPolicy>
      <encoder>
        <pattern>${log.pattern}</pattern>
      </encoder>
      <prudent>true</prudent>
    </appender>
  6. Next, further down in the file, add a new logger element at the bottom of the list of existing logger elements and fill it in as follows:
    <logger name="com.tridion.webforms">
      <appender-ref ref="rollingWebFormsLog"/>
    </logger>
  7. Save and close logback.xml and, depending on how you have Content Delivery set up, restart the Web application and/or restart all Windows services or UNIX processes related to Content Delivery. If you have an attribute scan set to the value true in your root configuration element in logback.xml, there is no need to restart your Web application.