@@ -56,7 +56,7 @@ public JdbcConnector(final ILogNode logNode) {
5656
5757 public List <IMendixObject > executeQuery (final String jdbcUrl , final String userName , final String password ,
5858 final IMetaObject metaObject , final String sql , final IContext context ) throws SQLException , DatabaseConnectorException {
59- logNode .trace (String .format ("executeQuery: %s, %s, %s" , jdbcUrl , userName , sql ));
59+ if ( logNode . isTraceEnabled ()) logNode .trace (String .format ("executeQuery: %s, %s, %s" , jdbcUrl , userName , sql ));
6060
6161 try (Connection connection = connectionManager .getConnection (jdbcUrl , userName , password );
6262 PreparedStatement preparedStatement = preparedStatementCreator .create (sql , connection );
@@ -68,7 +68,7 @@ public List<IMendixObject> executeQuery(final String jdbcUrl, final String userN
6868
6969 public List <IMendixObject > executeQuery (final String jdbcUrl , final String userName , final String password ,
7070 final IMetaObject metaObject , final IStringTemplate sql , final IContext context ) throws SQLException , DatabaseConnectorException {
71- logNode .trace (String .format ("executeQuery: %s, %s, %s" , jdbcUrl , userName , sql ));
71+ if ( logNode . isTraceEnabled ()) logNode .trace (String .format ("executeQuery: %s, %s, %s" , jdbcUrl , userName , sql ));
7272
7373 try (Connection connection = connectionManager .getConnection (jdbcUrl , userName , password );
7474 PreparedStatement preparedStatement = preparedStatementCreator .create (sql , connection );
@@ -98,7 +98,7 @@ private IMendixObject createMendixObject(final IContext context,
9898 for (Map .Entry <String , Optional <Object >> column : columns .entrySet ()) {
9999 setMemberValue (context , metaObject , obj , column .getKey (), column .getValue ());
100100 }
101- logNode .trace ("Instantiated object: " + obj );
101+ if ( logNode . isTraceEnabled ()) logNode .trace ("Instantiated object: " + obj );
102102 return obj ;
103103 }
104104
@@ -131,7 +131,7 @@ private void setMemberValue(IContext context, IMetaObject metaObject, IMendixObj
131131
132132 public long executeStatement (final String jdbcUrl , final String userName , final String password , final String sql )
133133 throws SQLException {
134- logNode .trace (String .format ("executeStatement: %s, %s, %s" , jdbcUrl , userName , sql ));
134+ if ( logNode . isTraceEnabled ()) logNode .trace (String .format ("executeStatement: %s, %s, %s" , jdbcUrl , userName , sql ));
135135
136136 try (Connection connection = connectionManager .getConnection (jdbcUrl , userName , password );
137137 PreparedStatement preparedStatement = preparedStatementCreator .create (sql , connection )) {
@@ -141,7 +141,7 @@ public long executeStatement(final String jdbcUrl, final String userName, final
141141
142142 public long executeStatement (final String jdbcUrl , final String userName , final String password ,
143143 final IStringTemplate sql ) throws SQLException {
144- logNode .trace (String .format ("executeStatement: %s, %s, %s" , jdbcUrl , userName , sql ));
144+ if ( logNode . isTraceEnabled ()) logNode .trace (String .format ("executeStatement: %s, %s, %s" , jdbcUrl , userName , sql ));
145145
146146 try (Connection connection = connectionManager .getConnection (jdbcUrl , userName , password );
147147 PreparedStatement preparedStatement = preparedStatementCreator .create (sql , connection )) {
@@ -151,7 +151,7 @@ public long executeStatement(final String jdbcUrl, final String userName, final
151151
152152 public void executeCallableStatement (final String jdbcUrl , final String userName , final String password ,
153153 final Statement stmt ) throws SQLException , DatabaseConnectorException {
154- logNode .trace (String .format ("executeCallableStatement: %s, %s, %s" , jdbcUrl , userName , stmt .getContent ()));
154+ if ( logNode . isTraceEnabled ()) logNode .trace (String .format ("executeCallableStatement: %s, %s, %s" , jdbcUrl , userName , stmt .getContent ()));
155155
156156 try (Connection connection = connectionManager .getConnection (jdbcUrl , userName , password );
157157 StatementWrapper callableStatement = callableStatementCreator .create (stmt , connection )) {
0 commit comments