Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Logging The Events - Show the Typical Log Stack (BIRT)

Revision as of 14:54, 12 March 2007 by Scottr.innoventsolutions.com (Talk | contribs) (New page: Logging The Events - Show the Typical Log Stack (BIRT) This example is Bugzilla ID [https://bugs.eclipse.org/bugs/show_bug.cgi?id=177044 Logging Example Code]. == Introduction == The even...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Logging The Events - Show the Typical Log Stack (BIRT) This example is Bugzilla ID Logging Example Code.

Introduction

The event model can be invoked from either JavaScript or Java. This entry provides two examples that use both interfaces to demonstrate the typical callstack invoked when running a report. Run either example report and look in your ECLIPSE_HOME directory, you will find log files generated for all of the events of the report.

BIRT Version Compatibility

This example was built using version 2.2 M5.

Example Files

Add a URL to your bugzilla attachment. eg. Example Logging Project Zipped

Description

There are two report example java_logging_demo.rptdesign uses the java based event handler. Within the source directory you will find all of the event handler classes. Each event handler class uses the java.util.logging class to display the class and method that is doing the logging. A custom formatter is used to format out the class name and method name from a simple logger.info("") method.

The javascript_logging_demo.rptdesign does the same thing using only JavaScript. The initialization of the logging is done in the initialize method of the Report Element. In the JavaScript example the formattter is used, but this will not show the method and class adequately since it reports on the framework classes that are processing the script as opposed to the actual JavaScript methods.

Comments

Please enter comments below by selecting the edit icon to the right. You will need a Bugzilla account to add comments.

Back to the top