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"
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With