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.
Whenever a Broker Query doesn't give me the results I expect, I head towards the MSSQL Query Profiler to see what actually happens on the database level.
I documented this process in an article on the Tridion practice wiki: http://code.google.com/p/tridion-practice/wiki/TroubleshootBrokerQueryGeneration .
A quick summary of the steps:
start the MSSQL Query Profiler
start a new Trace
filter the trace on database name
reload your page, so the query fires
find the query in the Profiler
copy the query into a better tool and reformat it
Once you reach step 6, it is often somewhat clear why there are no results. I often end up then modifying the SQL to give the results that I'm looking for. And from that I modify the Criteria to generate that SQL, which can at times be a challenge.
Related
In PhpStorm, I can change global, project or directories settings with existing SQL Dialects, but is there a way to configure SQL Dialects as Symfony/DQL in PhpStorm or a way to detect that App:Panel is a valid entity, not a table? (App:Panel table name is te_panel)
I read this answer which explains that we have to add a Java plugin, because it's currently not possible to add a new SQL Dialect on PhpStorm.
As example, this is an error that PhpStorm is throwing:
The : between App and Panel is not understood. It cannot understand the table name provided (because I provide the name of the Symfony entity).
DQL is not supported.
https://youtrack.jetbrains.com/issue/WI-9948 -- watch this ticket (star/vote/comment) to get notified on any progress.
You may try and treat App:Panel as placeholder (similar to how it was described in that linked question). But I have no ideas if it will help (have not really worked with Symfony/DQL so cannot test it myself).
What I may suggest though -- threat the whole query as plain text. Yes, no syntax highlighting and stuff but will not show errors either.
How? One way by placing special comment just before the string, e.g.
->query(/** #lang text */'SELECT ...');
Or by disabling Language Injection rule for SQL altogether.
Alternatively try what has been suggested in this comment -- custom SQL detection syntax(?): https://gist.github.com/willemnviljoen/d20ad8ad0cc365a7e80744328246610f
Obsolete Alfresco documentation says:
the download or preview of content are recorded as a single read
However, with Alfresco 5+ preview does not generate any audit event (I just tried).
QUESTION: How to make Alfresco log an audit event when someone previews a document on Alfresco Share? I am not too worried about thumbnails, but at least for the "Document Details" page:
Here is my audit application configuration:
audit.alfresco-access.enabled=true
audit.tagging.enabled=false
audit.filter.alfresco-access.default.enabled=true
audit.filter.alfresco-access.transaction.type=cm:folder;cm:content
audit.filter.alfresco-access.transaction.action=CREATE|READ|UPDATE CONTENT|CHECK IN|DELETE|COPY|MOVE
audit.audit-custom.enabled=true
audit.audit-custom.sub-actions.enabled=false
Your filter for actions is not set right,
Please note that you should be using ; for separating multiple possible values, not |.
So, I think you should be able to get previews and downloads audited with:
audit.filter.alfresco-access.transaction.action=CREATE;READ;UPDATE CONTENT;CHECK IN;DELETE;COPY;MOVE
Please note also that you might want to audit one extra action : READCONTENT
I'm working on a project where I'm using Symfony2 (latest) and SonataAdmin. I need to keep log of users actions by logging:
action/event date/time (when and at which time the user did something)
the user himself (the id of the user who did the action/event)
affected rows (which rows was affected by for example changing some data in a form)
I find in KnpBundles and over Google without success, can any give me some tips or ideas? Or if someone did this before give me some code as start point? Take in mind that I'm using SonataAdmin and this is a bit complicated.
The stofDoctrineExtensions (a Symfony wrapper for Gedmo's DoctrineExtensions) Loggable extension would do this for you.
This extensions can be set to log a username, changed (create, updated & remove) and the data changed (if specified) in a table that can then be used to log and/or revert changes.
StofDoctrineExtensions (Wrapper of below)
Gedmo\DoctrineExtensions (Loggable)
i have site where i need to develop site search functionality. the data may reside in database table or may in aspx page as static word. i search google and found that lucene.net may be appropriate for the site search functionality. but i never use lucene.net so i dont know how to create lucene.net index file. i want to develop 2 utility in my site like
1) one for create & update index file reading data from database table & physical aspx file.
2) utility which search multiple single or multiple keyword against index file.
i found a bit of code snippet which i just do not understand
string indexFileLocation = #"C:\Index";
string stopWordsLocation = #"C:\Stopwords.txt";
var directory = FSDirectory.Open(new DirectoryInfo(indexFileLocation));
Analyzer analyzer = new StandardAnalyzer(
Lucene.Net.Util.Version.LUCENE_29, new FileInfo(stopWordsLocation));
what is Lucene.Net.Util.Version.LUCENE_29 what is stopWordsLocation
how data need to store in Stopwords.txt
but have no concept to develop the above 2 utility. so please guide me how search my DB and as well as aspx files with lucene.net....i will be glad if some one discuss here with bit of sample code. thanks
Lucene.Net.Util.Version.LUCENE_29 just indicates the Lucene version your are using, you should always use the most up to date in new code. It is there for backward compatibility in case you upgrade your Lucene with a version that changes the StandardAnalyzer, but you dont want to re-index all your data.
The stopWordsLocation is the location of a file with your stop words, words you dont want to index.
IE: it, he, she, the, or, and etc...
Its a regular text file, each line should contain 1 stop word, and separate each line with a linebreak.
http://lucene.apache.org/core/old_versioned_docs/versions/3_0_1/api/all/org/apache/lucene/analysis/WordlistLoader.html#getWordSet(java.io.Reader)
I am trying to query Commerce Server 2007 using the Biztalk Adapter.
I am using the OrdersAdapter and trying to query for all orders with a specific line item on them.
The message xml is
<CommerceServerOrdersQuery>
<CLAUSE OPER="equal" xmlns="http://schemas.microsoft.com/CommerceServer/2004/02/Expressions">
<PROPERTY ID="LineItem.ProductId" MULTIVAL="false" TYPE="String" />
<IMMED-VAL TYPE="String">
<VALUE>xxx</VALUE>
</IMMED-VAL>
</CLAUSE>
</CommerceServerOrdersQuery>
If I query by PurchaseOrder.OrderStatus or some property on the purchase order, it works fine. however if i try to use the line item property as the criteria it fails with this error.
The 'ProductId' property is not a
searchable property of entity
'PurchaseOrder'. Searchable
properties can be discovered by
inspecting the DataSet returned by the
GetSearchableProperties method.
I did query the GetSearchableProperties service specified and it did indeed say that LineItem.ProductId is a searchable property. Furthermore if I do this query with the .NET API, i can see it producing the exact xml i am using and it works. The problem comes when using the BTS Adapter.
The documentation for this is pretty thin with no in depth examples, any help would be greatly appreciated.
Thank You.