Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Content Delivery Loggin

How to enable content delivery logging in Tridion 2011 sp1. We have .net version of content delivery. After installation of content delivery we changed logback file present in our application folder (D:\Inetpub\MyPortal\bin\config), below is the setting in logback xml

<property name="log.history" value="7"/>
<property name="log.folder" value="D:\tridion\log"/>
<property name="log.level" value="DEBUG"/>

After doing the change we reset the IIS. But we don't see any log file at above location.

Reason why we want to check log file is.

We have implemented content filter mechanism. In which we are using various Query Criteria like ItemSchemaCriteria, CustomMetaKeyCriteria, KeywordCriteria.

Somehow for some filters results are not displayed, though we have component present in broker database. How to check exactly what query is getting fired when filter mechanism is executed on page.

Note : At location d:\Tridion\log\ We can see files like cd_core.2012-10-25,cd_monitor.2012-10-25, cd_deployer.2012-10-25,cd_transport.2012-10-25 but these files are old we need today's log. (04-11-2012)

More inputs on issue : We found that when we add cirteria for Category that time results are not coming.

KeywordCriteria FilterCategory5303Criteria0= new KeywordCriteria("FilterCategory","Administrative"); Criteria[] filterCatCriteria5303 = {FilterCategory5303Criteria0}; Criteria filterCatOrCriteria5303 = CriteriaFactory.Or(filterCatCriteria5303); mainCriteria5303 =CriteriaFactory.And(mainCriteria5303, filterCatOrCriteria5303);

In CUSTOM_META table in broker db we have entry for 2 component. KEY_NAME = "FilterCategory" and KEY_STRING_VALUE="Administrative"

like image 261
user1453602 Avatar asked Dec 26 '22 15:12

user1453602


1 Answers

If you're using:

<property name="log.folder" value="D:\tridion\log"/>

then it's expected that you'll get no logging. Logback expects either double backslashes or simple (fwd)slashes. Example:

<property name="log.folder" value="D:\\tridion\\log"/>

or

<property name="log.folder" value="D:/tridion/log"/>

Further more, if you want to see what (JPQL) query Tridion creates for you from your Broker query then you need to set the logging to TRACE and to search in your logs for the following:

TRACE JPAQueryDAO - Broker Query generated:

This will give you an impression about the final SQL query generated in the end.

My last remark is about the KeywordCriteria and how you're using it. You should know that KeywordCriteria does not relate in any way to the CUSTOM_META table. For queries related to that table you should use the criterias called "CustomMeta***Criteria"

Probably, in your case you need to use:

new CustomMetaValueCriteria(new CustomMetaKeyCriteria("FilterCategory"), "Administrative");

Hope this helps.

Cheers, Daniel.

like image 178
Daniel Neagu Avatar answered Jan 29 '23 13:01

Daniel Neagu