Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Reducing the debug trace on server and client
[CDO] Reducing the debug trace on server and client [message #900913] Thu, 09 August 2012 02:41 Go to next message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member
Hi,

How can I control the level of debug trace that's generated by the CDO client and server. On the server side I removed the -debug and -Ddebug=true entries but that turn trace to info level. Is there a log4j properties file that I can configure and can anyone suggest log settings that I should use to get a reasonable amount of useful trace without a flood of information like network buffer dumps, etc?

Thanks,
Warwick

[Updated on: Thu, 09 August 2012 02:42]

Report message to a moderator

Re: Reducing the debug trace on server and client [message #900921 is a reply to message #900913] Thu, 09 August 2012 04:30 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Warwick,

Please prefix CDO questions in this shared newsgroup with "[CDO] ".

Net4j and CDO use a thin abstraction layer around the OSGi debug and trace options. Each plugin defines a .options file
in the root folder that is recognized by OSGi and PDE launch configs. They serve as defaults but can be overridden
through a global options file, which is usually located in the configuration/ folder of an installation.

See also:
- http://wiki.eclipse.org/FAQ_for_CDO_and_Net4j#How_can_I_enable_tracing.3F
- http://blog.ankursharma.org/2011/12/osgi-tracing-in-equinox.html
- http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html
- org.eclipse.net4j.util.om.OMPlatform

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper




Am 09.08.2012 04:41, schrieb Warwick Burrows:
> Hi,
>
> How can I control the level of debug trace that's generated by the CDO client and server. On the server side I
> removed the -debug and -Ddebug=true entries but that turn trace to info level. Is there a log4j properties file that I
> can configure and can anyone suggest log settings that I should use to get a reasonable amount of useful trace without
> a flood of information like network buffer dumps, etc?
>
> Thanks,
> Warwick
>


Re: [ CDO] Reducing the debug trace on server and client [message #900922 is a reply to message #900921] Thu, 09 August 2012 05:31 Go to previous messageGo to next message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member
Thanks Eike.

Actually I did edit the title of this post almost immediately after I posted it but it must not have propagated to everyone. Just in case I added it again to this reply to your post Smile

Thanks,
Warwick
Re: [ CDO] Reducing the debug trace on server and client [message #900923 is a reply to message #900922] Thu, 09 August 2012 05:34 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 09.08.2012 07:31, schrieb Warwick Burrows:
> Thanks Eike.
> Actually I did edit the title of this post almost immediately after I posted it
Hehe, doing it *before* is the trick :P

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [ CDO] Reducing the debug trace on server and client [message #913185 is a reply to message #900923] Fri, 14 September 2012 23:52 Go to previous messageGo to next message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member

Another question on logging for the CDO server. How do I add a timestamp to the log trace. I didn't see that described in any of the links you posted. I need to be able to match an error in the logs with the time in order to properly debug problems.

Thanks,
Warwick
Re: [ CDO] Reducing the debug trace on server and client [message #913267 is a reply to message #913185] Sat, 15 September 2012 05:47 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 15.09.2012 01:52, schrieb Warwick Burrows:
>
> Another question on logging for the CDO server. How do I add a timestamp to the log trace. I didn't see that
> described in any of the links you posted. I need to be able to match an error in the logs with the time in order to
> properly debug problems.
You can use these methods:

org.eclipse.net4j.util.om.trace.PrintTraceHandler.setPattern(String)
org.eclipse.net4j.util.om.trace.PrintTraceHandler.setShortContext(boolean)

Or register your own OMTraceHandler, e.g., a subclass of PrintTraceHandler.

Note that lgging and tracing are different things in the operations&maintenance framework (OM). I've created some
diagrams for you:

http://git.eclipse.org/c/cdo/cdo.git/plain/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/trace/doc-files/om.trace.png
http://git.eclipse.org/c/cdo/cdo.git/plain/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/log/doc-files/om.log.png
http://git.eclipse.org/c/cdo/cdo.git/plain/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/om/doc-files/om.png

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [ CDO] Reducing the debug trace on server and client [message #915606 is a reply to message #913267] Mon, 17 September 2012 16:17 Go to previous messageGo to next message
Warwick Burrows is currently offline Warwick BurrowsFriend
Messages: 132
Registered: July 2009
Location: Austin, TX
Senior Member
Thanks very much for the information and diagrams. This will help me a lot. Excuse my ignorance, but is there a way to add the timestamp pattern to the logs for the standalone CDO server deployment without changing code? If not then I can change the code but if I can change a properties file somewhere then it is all the better Smile
Re: [ CDO] Reducing the debug trace on server and client [message #915860 is a reply to message #915606] Tue, 18 September 2012 05:13 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 17.09.2012 18:18, schrieb Warwick Burrows:
> Thanks very much for the information and diagrams. This will help me a lot. Excuse my ignorance, but is there a way
> to add the timestamp pattern to the logs for the standalone CDO server deployment without changing code? If not then
> I can change the code but if I can change a properties file somewhere then it is all the better :)
The tracers are enabled/disabled through the .options files in the plugins, which in turn can be overridden by a global
-debug <options file> program argument. Unfortunately there's currently no way to configure the trace handlers
declaratively. Maybe you can use the Spring framework or something similar. Another approach could be to define your own
IAppExtension similar to the org.eclipse.emf.cdo.server.internal.security.SecurityExtension.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:XSD --&gt; Ecore question
Next Topic:How to create a "details details binding"
Goto Forum:
  


Current Time: Fri Apr 19 12:52:35 GMT 2024

Powered by FUDForum. Page generated in 0.02998 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top