Client side logging with JavaScript and ADF Faces

ADF Faces is using (on the server) a “wrapper” around the standard Java logging. Based on the given log-level, the server-side console “prints” out different messages. To make life (and debugging) easier we did a similar thing for the client-side: ADF Faces contains a rich client-side Logger API. In order to use it, you need to enable it inside of the web.xml file, like:

<context-param>
 <param-name>oracle.adf.view.rich.LOGGER_LEVEL</param-name>
 <param-value>WARNING</param-value>
</context-param>

Now you can also start to use the LOGGER API in your custom JavaScript code, like:

AdfLogger.LOGGER.logMessage(AdfLogger.SEVERE, "This is from your logger!");

This is really a nice feature. When running with Firebug, you see the messages inside of the FB console!

Howdy!

Posted in adf, ajax, javascript, jdeveloper, jsf, oracle, Oracle ADF Faces
7 comments on “Client side logging with JavaScript and ADF Faces
  1. Whats the advantage of that API over just using console.log (console.warn/error etc.)?

  2. matthiaswessendorf says:

    The LOGGER object abstracts away from that. On IE you get a different way to notice the “logs”, see here:
    http://biemond.blogspot.com/2009/05/middleware-11g-performance-guide.html

  3. matthiaswessendorf says:

    .. similar if you are not having Firebug installed

  4. For the Firebug-not-installed case, Firebug Lite works well enough.

  5. matthiaswessendorf says:

    Right, user needs to install etc. We offer this to fully offer an integrated logging for our framework. Both: development and debugging.

    If some external plugins work for you, that’s great!

  6. Actually Firebug Lite is just another script-tag/include, not something the user has to install. And it works for any application.

  7. matthiaswessendorf says:

    that’s nice..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: