3

We are using SDL Tridion 2013 at the Content Delivery side none of the log files are generating.

It is confirmed that all required jar files (logback-classic.jar, logback-core.jar, slf4j-api.jar, jcl-over-slf4j.jar) are in the lib folder and logback.xml is also configured properly. The path of the log folder is correct and the app-pool has full permissions on that folder.

<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
    <!-- Properties -->
    <property name="log.pattern" value="%date %-5level %logger{0} - %message%n"/>
    <property name="log.history" value="7"/>
    <property name="log.folder" value="D:/tridion/log"/>
    <property name="log.level" value="ALL"/>
    <property name="log.encoding" value="UTF-8"/>

    <!-- Appenders -->
    <appender name="rollingTransportLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/cd_transport.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <charset>${log.encoding}</charset>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>
    <appender name="rollingDeployerLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/cd_deployer.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <charset>${log.encoding}</charset>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>
    <appender name="rollingMonitorLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/cd_monitor.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <charset>${log.encoding}</charset>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>
    <appender name="rollingCoreLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/cd_core.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <charset>${log.encoding}</charset>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>
    <appender name="rollingCacheLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/cd_cache.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <charset>${log.encoding}</charset>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>
    <appender name="rollingLinkingLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/cd_link.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <charset>${log.encoding}</charset>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>
    <appender name="rollingSessionPreviewLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/cd_preview.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <charset>${log.encoding}</charset>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>

    <!-- Loggers -->
    <logger name="com.tridion" level="${log.level}"/>
    <logger name="com.tridion.transport" additivity="false">
        <appender-ref ref="rollingTransportLog"/>
    </logger>
    <logger name="com.tridion.transport.HTTPSReceiverServlet" additivity="false">
        <appender-ref ref="rollingDeployerLog"/>
    </logger>
    <logger name="com.tridion.transport.transportpackage" additivity="false">
        <appender-ref ref="rollingDeployerLog"/>
    </logger>
    <logger name="com.tridion.transformer" additivity="false">
        <appender-ref ref="rollingDeployerLog"/>
    </logger>
    <logger name="com.tridion.deployer" additivity="false">
        <appender-ref ref="rollingDeployerLog"/>
    </logger>
    <logger name="com.tridion.tcdl" additivity="false">
        <appender-ref ref="rollingDeployerLog"/>
    </logger>
    <logger name="com.tridion.event" additivity="false">
        <appender-ref ref="rollingDeployerLog"/>
    </logger>
    <logger name="com.tridion.monitor" additivity="false">
        <appender-ref ref="rollingMonitorLog"/>
    </logger>
    <logger name="Tridion.ContentDelivery" level="${log.level}" additivity="false">
        <appender-ref ref="rollingCoreLog"/>
    </logger>
    <logger name="com.tridion.linking" additivity="false">
        <appender-ref ref="rollingLinkingLog"/>
    </logger>
    <logger name="com.tridion.preview" additivity="false">
        <appender-ref ref="rollingSessionPreviewLog"/>
    </logger>
    <logger name="com.tridion.storage.persistence.session" additivity="false">
        <appender-ref ref="rollingSessionPreviewLog"/>
    </logger>

    <root level="ON">
        <appender-ref ref="rollingCoreLog"/>
    </root>
</configuration>
14
  • 1
    Any changes in logback.xml will not be picked up until the application restarts. Did you restarted it .
    – user584
    Commented Mar 4, 2014 at 10:05
  • 1
    Both app-pool and website restarted after the change. Commented Mar 4, 2014 at 10:19
  • is your logfile path correct, is it at per enviroment variable TRIDION_HOME ? also Validate logback.xml file in some XML validator. i validated the xml provided by you, it seems fine.
    – Raj Kumar
    Commented Mar 4, 2014 at 11:11
  • logfile path is correct. Commented Mar 4, 2014 at 11:48
  • 1
    2013 does not use SLF4J anymore...
    – Nuno Linhares
    Commented Mar 4, 2014 at 15:03

3 Answers 3

4

ON is not a valid logback log level, although IIRC, using an invalid value for level will result in DEBUG logging, so I don't think this will cause you not to see any output.

You are right to check the file permissions assigned to the application pool account. I would suggest taking this line of enquiry further using Sysinternals procmon to check for any failed file access.

You should confirm that your logback config file is, as the header says, UTF8, and that it's well-formed.

One other known cause for logging not to work is that Java is broken. I recall that Java 6 update 29 displayed exactly this behaviour, and I'm fairly sure there have been other problematic versions.

1

Post is quite old but it might help someone else. The consolidated jar of activemq (activemq-all-5.14.3.jar) contains slf4j jar files as well which confilicts with the jar files already available in CD installation. For activemq add individual files of activemq from lib folder of activemq except slf4j and it will start working.

0

I think the level of the root is incorrect, try:

<root level="OFF">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.