ADFLogger

809 views
Skip to first unread message

grant ronald

unread,
Mar 1, 2012, 5:10:15 AM3/1/12
to adf-met...@googlegroups.com
All, I'm thinking of writing up some best practice of using ADFLogger
and wanted to include any pearls of wisdom from those working at the
sharp end of ADF.
For example:
1) Do you use is exclusively or teamed up with some other solution
2) What guidance do you give you teams (or do you just ask them to
pepper log statements where ever they choose)
3) Any "must log" places
4) Do you have some sort of generic solution where you put logging into
framework classes
5) Are logging statements like "You got to this method" really that
useful to you.
6) Did you use logging for checking things like which phase you were in
in JSF lifecycle
7) Any tips for task flows - e.g. so you knew which task flow was being
called with what parameters
8) Was it useful to use logging so you knew when app modules were being
pooled
9) Any tips on how you use the log analyser?
10) how granular do you put log statements and any guidance you give
your teams on what constitutes warning/info/sever/fine/finer etc

Anything else...

I'll do my best to collate this into some sort of paper or demo.

thanks

Pedro Melo Medeiros

unread,
Mar 1, 2012, 5:13:31 AM3/1/12
to adf-met...@googlegroups.com
Hi,

3) "must log" places: at the beginning and returning of a task flow, showing the input and output parameters;



--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodology+unsubscribe@googlegroups.com

All content to the ADF EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/).  Any content sourced must be attributed back to the ADF EMG with a link to the Google Group (http://groups.google.com/group/adf-methodology).

Emmerson Miranda

unread,
Mar 1, 2012, 6:33:03 AM3/1/12
to adf-met...@googlegroups.com
And webservices client and server.

Emmerson.


--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodolo...@googlegroups.com

Chad Thompson

unread,
Mar 1, 2012, 8:55:44 AM3/1/12
to adf-met...@googlegroups.com

On Thursday, March 1, 2012 at 4:10 AM, grant ronald wrote:


5) Are logging statements like "You got to this method" really that
useful to you.
I would say that these kinds of methods - depending on the system architecture, of course, are really useful for tracking issues in systems where you don't really have 'control' over the deployment.  (For example, a group of developers working in an organization where they don't have shell access to the production server, for instance.)

Having the ability to see what's going on in your application through the Enterprise Manager is a great tool, particularly in spots where there is a transition between 'layers' - if that makes sense.

- Chad

-- 
Chad Thompson 
chad_t...@mac.com

Edwin Biemond

unread,
Mar 1, 2012, 1:31:31 PM3/1/12
to ADF Enterprise Methodology Group

Hi,

I use it everywhere , especially because we also use it heavily in SOA
suite and a great way to see the logging in the em ( the logger view
can be better , able to maximize the page or a bigger view , maybe log
and log level view in one screen with tabs , change log level for a
particular time, just for 5 min for example)

A co worker also made a commons logging implementation of adf logger
so we can use it in our existing web services and ejb session beans.
Strange oracle did not provide this.

Thanks Edwin
> chad_thomp...@mac.com

Jan Vervecken

unread,
Mar 1, 2012, 2:03:56 PM3/1/12
to ADF Enterprise Methodology Group
hi Grant

These forum threads could be related to your questions:
- "ADFLogger configuration for Oracle Business Component Browser and
JUnit tes"
at https://forums.oracle.com/forums/thread.jspa?threadID=1955636
- "how to configure logging for Utils buildFacesMessage"
at https://forums.oracle.com/forums/thread.jspa?threadID=1805075

- about "5) Are logging statements like "You got to this method"
really that useful to you."
and "8) Was it useful to use logging so you knew when app modules were
being pooled"
see also forum thread "painting a picture of Application Module
pooling"
at https://forums.oracle.com/forums/thread.jspa?threadID=2353163

regards
Jan Vervecken

Chris Muir

unread,
Mar 4, 2012, 6:32:07 PM3/4/12
to adf-met...@googlegroups.com
I had a chat with Grant about ADFLogging and wanted to share my
experiences with the group. From my last customer's project I was
influenced by Duncan Mill's 5 part ADFLogger series
(http://bit.ly/zsWE9k). Three things I'd like to share on how we used
the logger:

1) Initially I set it up in our ADF BC framework classes on overridden
methods to watch when the framework did it's job. Now this was overkill
as the -Djbo.console option already logs most of this, essentially I was
double logging. Yet I find most of ADF BC's logs unfathomable in the
sense it's way too verbose, and the logs have been written for Oracle's
own ADF BC staff as a debugging tool, not for the everyday programmer
trying to make use of ADF BC. Typically things I added logging was the
VO executeQueryForCollection() so I could see what queries (and bind
params) were hitting the database, and especially the AM methods around
AM pooling for working out what was happening with the task flow
transaction options (as a side note Jan Vervecken is doing some
interesting work there right now http://bit.ly/yUcJSW).

2) Another location where I found logs useful was in JSF managed beans,
in particular the constructors. Without this I wouldn't have discovered
what I considered a subtle issue on the order of bean instantiation (see
"ADF Faces - a logic bomb in the order of bean instantiations"
http://bit.ly/x8I2zD). For the original issue the blog was written
against, the logging allowed us to triage and solve the issue in about
30 minutes which was a real proving point for the logging IMHO.

3) As Pedro pointed out, on the task flow initializers and finalizers
including parameter values (see http://bit.ly/ykhykP). This gives you
the power to "replay" a task flow with the same parameters. But
importantly it also gives you the power to see when task flows are
restarting, which is not always obvious with task flows embedded in regions.

What I was missing at the time was guidance from Oracle how much
overhead the logging has on any solution. Of course the logs can be
controlled by using isLoggable, but if we were to turn it on in a
production scenario what would be the cost? I'll take this up with
Grant to see if we can give some guidance.

Cheers,

CM.

STEVEN DAVELAAR

unread,
Mar 5, 2012, 5:31:09 AM3/5/12
to adf-met...@googlegroups.com, Chris Muir
Chris,

Some additional remarks/observations:

- I would consider using -Djbo.debugoutput as old school. This must be set before starting weblogic and cannot be changed at runtime. Using ODL you can set a persistent or transient logger at runtime on "oracle.jbo" which will provide you with the same output.

- By adding an ODL logger on classes like TaskFlowCallActivityLogic and TaskFlowReturnActivityLogic you will get information when tasflows start or end or are abandoned.

- I think there is a lot to improve in the way ADF handles logging. The typical custom logging events mentioned in this thread should really be provided out-of-the-box by using ODL on the appropriate class.
Unfortunately, the fine-grained class-specific logging that we can switch on for task flows is not available for ADF BC. Most developers only want to see queries fired and bind parameter values, which is handled in oracle.jbo.server.ViewObjectImpl (queries) and  oracle.jbo.server.OracleSQLBuilderImpl (bind params). However, we cannot turn logging on for these individual classes because they check for "Diagnostic.isOn". If you add a "finest" ODL logger for ADFLoggerDiagnosticImpl you get queries and bind params logging, but also thousands of other unuseful logging statements (similar to "finest" on oracle.jbo or -Djbo.debugoutput).
And the aforementioned taskflow classes miss some obvious logging candidates like values of taskflow input and return parameters.

- Going forward (12c?) it would be really nice to have a JDev logging preferences panel as a layer on top of ODL so developers don't need to know the above class names but simply check a checkbox for things like "log query", "log bind vars", "log taskflow input params" etc.

Steven.
--

Steven Davelaar| Technology Director | Oracle Consulting
Tel +31 30 669 8113 | Fax +31 30 669 9966
Oracle Nederland BV | Rijnzathe 6, 3454 PV De Meern, The Netherlands
PO Box 147, 3454 ZJ De Meern,The Netherlands | KvK nr. 30096087
Oracle Expert Services | JHeadstart

Sandra Muller

unread,
Mar 8, 2012, 3:43:10 AM3/8/12
to ADF Enterprise Methodology Group
In response to:

> 1) Do you use it exclusively or teamed up with some other solution

We use Logback (http://logback.qos.ch) for all non-ADF logging. We
changed to Logback from Log4j because of the following reasons:
• Faster implementation
• Smaller memory footprint
• Extensive battery of tests
• Extensive documentation
• Loads of features
– Configuration files in XML or Groovy
– Auto reloading of configuration files (without extra thread)
– Conditional processing of configuration files
– Extensive filtering
– ...

We capture logging from other frameworks (that use log4j or
java.util.logging) using SLF4J, so that it can be included in Logback.

Jang-Vijay Singh

unread,
Apr 29, 2012, 8:28:13 AM4/29/12
to adf-met...@googlegroups.com
Does anyone use the ADFLogger* (or any other kind of logger) from within groovy expressions?
I thought of introducing it in my project where a number of complex calculations are present in groovy expressions - any errors or exceptions would be handy if logged for diagnostics 
Any thoughts on this?

*By exposing the logger instance via a ViewImpl (or common base ViewImpl) and accessing it in the groovy expression(s) through viewObject.logger


Reply all
Reply to author
Forward
0 new messages