Adventures in ADF Logging - Part 2

Thanks to Duncan Mills for this story

Logging Templates

view counter

OK last time I said I'd tell you about how to look at the logging output next, but then I got all enthusiastic this morning and thought I'd create some code templates to help you use the ADFLogger. Code templates are a really neat feature of JDeveloper and if there is some bit of code (like logging) that you use a lot then 5 minutes spent building a template can save you a bunch of time in the long run.

Here are the templates I've created:

Shortcut Purpose
lgdef A basic static class logger definition
lgdefr A basic static class logger definition with resource bundle
lgdefp A basic static package logger definition
lgi Log statement for an informational message
lgc Log statement for configuration information
lgw Log statement for a warning message
lgs Log statement for an error message
lgdef A basic static class logger definition
lgdefr A basic static class logger definition with resource bundle
lgdefp A basic static package logger definition
lgig Guarded log statement for an informational message
lgcg Guarded log statement for configuration information
lgwg Guarded log statement for a warning message
lgsg Guarded log statement for an error message

Installing the Templates

I've made these templates available as an XML export that you can download from here: loggingTemplates.xml

To install these:

  1. Open  Tools > Preferences from the JDeveloper menu
  2. Expand the Code Editor  > Code Templates node in the preferences navigator
  3. Select the More Actions  > Import menu option as shown here and import the xml file.

Logging import

Read the entire article at its source

view counter
ITNewsCast is the only resource that is entirely dedicated to delivering ahead of the curve, exhaustive coverage about the Oracle Corporation and Oracle technologies. ITNewsCast is the authoritative resource where Oracle professionals look to for Oracle Support, Oracle News, Oracle Editorials, Oracle Reviews, Oracle Tips and Tricks and Oracle Announcements.

With a first appearance in 2009, ITNewsCast already has over 40,000 visitors a month. ITNewsCast lets you reach the people you want to reach most, the decision makers and the technicians that consume Oracle technologies.