[
https://issues.apache.org/jira/browse/OAK-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13764023#comment-13764023
]
Chetan Mehrotra edited comment on OAK-946 at 9/11/13 5:56 AM:
--------------------------------------------------------------
This patch enables logging of major JCR operations being performed like Node
added, property changed etc).
If DEBUG level logging is enabled for
{{org.apache.jackrabbit.oak.jcr.operations}}then the operation details would be
logged
Following is the output of running the CRUD test
{noformat}
11:20:12.175 DEBUG [main] SessionDelegate.java:437 session-2 Adding
node [hello]
11:20:12.189 DEBUG [main] SessionDelegate.java:437 session-2 Setting
property [/hello/world]
11:20:12.191 DEBUG [main] SessionDelegate.java:437 session-2 Session
saved
11:20:12.199 DEBUG [main] SessionDelegate.java:437 session-2 Setting
property [/hello/world]
11:20:12.199 DEBUG [main] SessionDelegate.java:437 session-2 Session
saved
11:20:12.205 DEBUG [main] SessionDelegate.java:437 session-2 Removing
node [/hello]
11:20:12.205 DEBUG [main] SessionDelegate.java:437 session-2 Session
saved
{noformat}
Such logs simplify debugging conflict related exceptions as one can see
operations per session
was (Author: chetanm):
This patch enables logging of major JCR operations being performed like
Node added, property changed etc).
If DEBUG level logging is enabled for
{{org.apache.jackrabbit.oak.jcr.operations}}then the operation details would be
logged
Following is the output of running the CRUD test
{noformat}
11:20:12.175 DEBUG [main] SessionDelegate.java:437 session-2 Adding
node [hello]
11:20:12.189 DEBUG [main] SessionDelegate.java:437 session-2 Setting
property [/hello/world]
11:20:12.191 DEBUG [main] SessionDelegate.java:437 session-2 Session
saved
11:20:12.199 DEBUG [main] SessionDelegate.java:437 session-2 Setting
property [/hello/world]
11:20:12.199 DEBUG [main] SessionDelegate.java:437 session-2 Session
saved
11:20:12.205 DEBUG [main] SessionDelegate.java:437 session-2 Removing
node [/hello]
11:20:12.205 DEBUG [main] SessionDelegate.java:437 session-2 Session
saved
{noformat}
> Improve support for debugging Oak
> ---------------------------------
>
> Key: OAK-946
> URL: https://issues.apache.org/jira/browse/OAK-946
> Project: Jackrabbit Oak
> Issue Type: Task
> Components: core, jcr
> Affects Versions: 0.8
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Priority: Minor
> Attachments: OAK-946-2.patch, OAK-946.patch
>
>
> To simplify diagnosing Oak related issues and also runtime debugging we
> should have some inbuilt support in Oak
> * Way to uniquely identify session, ContentSession and SessionDelegate
> * Look into possibility of exposing session as SLF4j Marker [1] instance
> while logging
> [1]
> http://stackoverflow.com/questions/4165558/best-practices-for-using-markers-in-slf4j-logback
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira