4

Good Afternoon,

I am working in a SmartTarget project (Tridion 2011 SP1/ ST 2011 SP2), I have all the cartridges configured (the ones i need), and I want to know how I can turn on the log to see the the collection of claims that are passed in the FredHopper Call.

At this moment i've setup the smartTarget Log in the Delivery Web App, this is the log I am getting right now :

    2014-01-13 16:15:29,512 DEBUG Query - initializing web service client for: http://CMS:8180/fredhopper-ws/services/FASWebService?wsdl
    2014-01-13 16:15:30,709 TRACE Stopwatches - Performance result [thread: 32] 'FredhopperWSInit': 1197 milliseconds(LONG).
    2014-01-13 16:15:30,710 DEBUG Query - Constructing Fredhopper query
    2014-01-13 16:15:30,739 TRACE Stopwatches - Performance result [thread: 32] 'Query.InitParseEntityModel': 29 milliseconds.
    2014-01-13 16:15:30,740 DEBUG Query - Executing query: fh_location=//catalog01/en_US/categories<{catalog01_tcm_0_9_1_tcm_9_9_4}&fh_view=home
    2014-01-13 16:15:30,842 TRACE Stopwatches - Performance result [thread: 32] 'Query.GetAll': 102 milliseconds.
    2014-01-13 16:15:30,848 TRACE Stopwatches - Performance result [thread: 32] 'Query.CreateResultSet': 5 milliseconds.
    2014-01-13 16:15:30,848 TRACE Stopwatches - Performance result [thread: 32] 'Query.ExecuteFredhopperQuery': 138 milliseconds.
    2014-01-13 16:15:30,851 DEBUG Query - Query returned 0 item(s)
    2014-01-13 16:15:30,851 DEBUG Query - Query returned 1 promotion(s):
    2014-01-13 16:15:30,859 DEBUG Query - Promotion: [HomePage Promotions] with [2] number of items for region [PromosRegion]

I remember that once I was able to turn-on the level of logging i am trying to accomplish now. but i lost that environment (the amazon instance got corrupted), so i missed the configuration.

Any help would be very appreciedted.

Regards, yeremy.

Update 1 [01-14-14]

Actually, the Log that I already had configured (in the delivery Side/Java App) at the moment i wrote this question was :

    <appender name="rollingSmartTargetLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/smarttarget.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender> 



    <!-- All Java based smarttarget -->
    <logger name="com.tridion.smarttarget" level="ALL">
        <appender-ref ref="rollingSmartTargetLog"/>
    </logger>
    <!-- specific one for ambientdata -->
    <logger name="com.tridion.smarttarget.ambientdata" level="ALL">
        <appender-ref ref="rollingSmartTargetLog"/>
    </logger>
    <!-- all .Net logs through Juggernet -->
    <logger name="Tridion.SmartTarget" level="ALL">
        <appender-ref ref="rollingSmartTargetLog"/>
    </logger>

So, it should be another configution. maybe at FH/ST side.

[Updated 01-15-14]

The above configuration is enough to accomplish what i wanted, but the problem (in my environment) is that for some reason my Java app is not getting access to the ClaimStore. here more details about this issue

  • Just a note that in SmartTarget 2014, the query is logged with the INFO level. So you don't have to set the log level all the way to DEBUG to see the queries. – Peter Kjaer Apr 22 '14 at 13:32
2

You can get this information from Content Delivery\configuration\samples\logback_sample.xml on your CD layout.

You may then copy the appender and logger sections into your existing logback.xml.

  • That's this one: gist.github.com/jhorsman/8419553 – Jan H Jan 14 '14 at 14:58
  • No, that's the one from Tridion - I'm talking about the sample from SmartTarget. He managed to install so I'm sure he has access to it :) – Peter Kjaer Jan 14 '14 at 15:10
  • Oops, my bad. This I think this is the right one. Sharing for everyone else reading along. gist.github.com/jhorsman/8420871 – Jan H Jan 14 '14 at 16:15
  • I did this before the writing the question, this configuration is enough to see the claims that are being added. the problem was that i am not getting access to the ClaimStore from my Java App that uses SmartTarget, I wrote another question about that problem : tridion.stackexchange.com/questions/4176/… – yeremy Seminario Jan 15 '14 at 7:33
3

Here's the snippets from my log file (logback.xml) that I think will help you configure your environment:

<appender name="rollingSmartTargetLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <fileNamePattern>${log.folder}/smarttarget.%d{yyyy-MM-dd}.log</fileNamePattern>
      <maxHistory>${log.history}</maxHistory>
    </rollingPolicy>
    <encoder>
      <pattern>${log.pattern}</pattern>
    </encoder>
    <prudent>true</prudent>
</appender>

and here's the logger:

<logger name="com.tridion.smarttarget" level="${log.level}">
    <appender-ref ref="rollingSmartTargetLog" /> 
</logger>
1

I use this one for logging during SmartTarget development. See this gist for the full logback.xml.

    <appender name="rollingSmartTargetLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.folder}/smarttarget.%d{yyyy-MM-dd}.log</fileNamePattern>
            <maxHistory>${log.history}</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>${log.pattern}</pattern>
        </encoder>
        <prudent>true</prudent>
    </appender>

    <logger name="com.telenor.tridion.claims" level="${log.level}">
        <appender-ref ref="rollingSmartTargetLog"/>
    </logger>

    <!-- Tridion SmartTarget -->
    <logger name="com.tridion.smarttarget" level="${log.level}">
            <appender-ref ref="rollingSmartTargetLog"/>
    </logger>
    <!-- SmartTarget .Net logs through Juggernet -->
    <logger name="Tridion.SmartTarget" level="${log.level}">
        <appender-ref ref="rollingSmartTargetLog"/>
    </logger>

    <!-- Tridion AmbientDataFramework -->
    <logger name="com.tridion.ambientdata" level="${log.level}">
        <appender-ref ref="rollingSmartTargetLog"/>
    </logger>
    <!--<logger name="com.tridion.smarttarget.ambientdata" level="${log.level}">
        <appender-ref ref="rollingSmartTargetLog"/>
    </logger>-->

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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