Jody,

Thanks for your answer.

I finally got it working with:
org.geotools.jdbc.level=FINE
org.geotools.jdbc.SQLDialect.level=FINE

This does not work: org.geotools.jdbc.logging.level=FINE

It is not clear from any documentation.


Ron


________________________________
 From: Jody Garnett <[email protected]>
To: Ron Lindhoudt <[email protected]> 
Cc: "[email protected]" 
<[email protected]> 
Sent: Monday, March 25, 2013 7:40 AM
Subject: Re: [Geotools-gt2-users] How do I turn on FINE Logging for package 
org.geotools.data.oracle?
 

In reviewing the code I do not see a log of logging at that level.

1. SQL generation is often handled by SQLDialect which provides:

protected static final Logger LOGGER = Logging.getLogger(SQLDialect.class);

So either of the OracleDialect implementations should use this. So your 
logging.properties should reference "org.geotools.jdbc.SQLDialect"

2. JDBCDataStore makes use of a logger created by its superclass:

this.LOGGER = org.geotools.util.logging.Logging.getLogger( 
getClass().getPackage().getName());

This should result in "org.geotools.jdbc"

3. For actually running the SQL .. it happens where it is needed. The most 
useful is JDBCFeatureReader (however it is not logging the SQL used).

    public JDBCFeatureReader( String sql, Connection cx, JDBCFeatureSource 
featureSource, SimpleFeatureType featureType, Hints hints ) 
        throws SQLException {
        init( featureSource, featureType, hints );
        
        //create the result set
        this.cx = cx;
        st = cx.createStatement(ResultSet.TYPE_FORWARD_ONLY, 
ResultSet.CONCUR_READ_ONLY);
        st.setFetchSize(featureSource.getDataStore().getFetchSize());
        
        
((BasicSQLDialect)featureSource.getDataStore().getSQLDialect()).onSelect(st, 
cx, featureType);
        rs = st.executeQuery(sql);
    }

This class is called from a number of locations such as 
JDBCFeatureSource.getReaderInternalQuery() - 

                   //build up a statement for the content
                    String sql = getDataStore().selectSQL(querySchema, 
preQuery);
                    getDataStore().getLogger().fine(sql);
        
                    reader = new JDBCFeatureReader( sql, cx, this, querySchema, 
query.getHints() );

So this is your best bet, "org.geotools.jdbc" set to FINE 
-- 
Jody Garnett


On Sunday, 24 March 2013 at 6:05 PM, Ron Lindhoudt wrote:
 
>Hey,
> 
>How can I turn on FINE logging to display the sql statements in package 
>org.geotools.data.oracle?
>I tried several thing in logging.properties but nothing helps.
>I also want to show sql statements that are executed in FeatureLayer during 
>StreamingRenderer.paint.
> 
>Thanks.
> 
>Ron
> 
>------------------------------------------------------------------------------
>Everyone hates slow websites. So do we.
>Make your web apps faster with AppDynamics
>Download AppDynamics Lite for free today:
>http://p.sf.net/sfu/appdyn_d2d_mar
>_______________________________________________
>GeoTools-GT2-Users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users 
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to