How to enable Loggin content delivery service

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

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

After making the change, we reset IIS. But we do not see the log file in the above location.

The reason we want to check the log file.

We have implemented a content filtering mechanism. In which we use various query criteria, such as ItemSchemaCriteria, CustomMetaKeyCriteria, KeywordCriteria.

Somehow, for some filters, the results are not displayed, although we have a component that is present in the broker database. How to accurately check which request is triggered when the filter mechanism is executed on the page.

Note: In the place d: \ Tridion \ log \ We can see files such as 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 magazine. (04-11-2012)

Additional Release Notes: We found that when we add cirteria for a category, the results of this time do not come.

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

In the table CUSTOM_META in the db broker, we have an entry for 2 components. KEY_NAME = "FilterCategory" and KEY_STRING_VALUE = "Administrative"

+4
source share
2 answers

Whenever a broker request does not give me the expected results, I go to the MSSQL Query Profiler to find out what is actually happening at the database level.

I documented this process in the Tridion wiki practice article: http://code.google.com/p/tridion-practice/wiki/TroubleshootBrokerQueryGeneration .

A brief description of the steps:

  • run MSSQL Query Profiler
  • run a new trace
  • filter trace by database name
  • reload the page for the request to work
  • find request in Profiler
  • copy the request to the best tool and reformat it

Once you reach step 6, it is often somewhat understandable why there are no results. I often end up modifying SQL to give the results I'm looking for. And from this, I change the criteria for creating this SQL, which can sometimes be a problem.

+2
source

If you use:

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

then he expected you to not receive registration. Logback expects either a double backslash or a simple (fwd) slash. Example:

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

or

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

In addition, if you want to see which query (JPQL) Tridion creates for you from your Broker query, you need to set logging to TRACE and search your logs for the following:

 TRACE JPAQueryDAO - Broker Query generated: 

This will give you an idea of ​​the final SQL query generated at the end.

My last point is about KeywordCriteria and how you use it. You should know that KeywordCriteria does not apply to the CUSTOM_META table. For queries related to this table, you should use criteria called CustomMeta criteria ***

Perhaps in your case you need to use:

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

Hope this helps.

Cheers, Daniel.

+8
source

Source: https://habr.com/ru/post/1443913/


All Articles