18 January 2011

Using Diagnostic Messages for troubleshooting

You can enable Diagnostic messages when running your application (on WLS (WebLogic Server) or BC Tester).

Enable diagnostic messages post will tell you how to configure the BC and/or Weblogic Server to print these messages.

To find the available diagnostic message you can enable, take a look at oracle.jbo.common.logging.Diagnostic.properties file.
This file's  purpose is  for DEBUG build of Business Components for Java. This is the file used to determine the way that Diagnostic  calls in the code are handled: all of its the properties  can be overridden by specifying then as -D switches to the java VM.


The available properties are:

jbo.debugoutput=console
Valuesconsole|silent|classname|file
Which implementation of IDiagnostic to use: console|silent|classname classname is the fully qualified name of a user-defined class that implements the IDiagnostic interface
Also a 4th options is available. You can set it to be jbo.debugoutput=file.
In this case the diagnostic messages will be written to file. The location of the file is the system/user temp 
directory and will be printed (so as for you to be sure the -D switches are applied ) when you run your 
application (either from the BC Tester (when testing BC) or when running app on Weblogic).
eg.
Target URL -- http://127.0.0.1:7101/MyWebapps-context-root/faces/main
Diagnostics: (Properties (re)loaded) Routing diagnostics to File: C:\DOCUME~1\spiros\LOCALS~1\Temp\bc4j5308862451677235376.log


jbo.logging.show.function=false
Values:true|false
Setting to true will output the name of the class and method displaying the log.
Eg. <3>[11] (10) RowSetHelper.getListeners Getting listeners ready...
In the above example:
  •  <3>  - the message is issues at trace level 3
  •  [11] - this is trace line number 11
  •  (10) - 10 ms have elapsed since the last trace message
  •  RowSetHelper - class from which the trace message was issued
  •  getListeners - function from which the trace message was issued
  •  Getting Listeners ready ... - test of the trace message


jbo.logging.show.linecount=true
Values:true|false
Show a linecount as each diagnostic line is output (true|false)


jbo.logging.trace.threshold=3
Logging cutoff threshold: any trace messages with a level  higher than this threshold will be suppressed (to understand it better log4j has the reverse priority).
For a release build, system Diagnostic messages are at level 3
dditionally, in a Debug build, DebugDiagnostic messages are at level 6


jbo.debug.prefix=DBG
Prefix string to display on DebugDiagnostic lines.Debug build only


jbo.logging.show.timing=false
Show elapsed time info every call (true|false)


jbo.logging.show.level=false
Show level of trace statement




Dig more:



No comments:

Post a Comment

You might also like:

Related Posts Plugin for WordPress, Blogger...