@@ -67,7 +67,7 @@ public void execute(ExecutionParameters parameters) {
67
67
boolean isOracle = dbEngine .equals (Engines .ORACLE .name ().toLowerCase ());
68
68
69
69
for (Map .Entry <String , JsonValue > entry : body .entrySet ()) {
70
- LOGGER .info ("{} = {}" , entry .getKey (), entry .getValue ());
70
+ LOGGER .trace ("{} = {}" , entry .getKey (), entry .getValue ());
71
71
primaryKey .append (entry .getKey ());
72
72
primaryValue .append (entry .getValue ());
73
73
primaryKeysCount ++;
@@ -78,25 +78,25 @@ public void execute(ExecutionParameters parameters) {
78
78
try (Connection connection = Utils .getConnection (configuration )) {
79
79
LOGGER .info ("Executing lookup row by primary key action" );
80
80
Utils .columnTypes = Utils .getColumnTypes (connection , isOracle , tableName );
81
- LOGGER .info ("Detected column types: " + Utils .columnTypes );
81
+ LOGGER .debug ("Detected column types: " + Utils .columnTypes );
82
82
try {
83
83
QueryFactory queryFactory = new QueryFactory ();
84
84
Query query = queryFactory .getQuery (dbEngine );
85
- LOGGER .info ("Lookup parameters: {} = {}" , primaryKey .toString (), primaryValue .toString ());
85
+ LOGGER .trace ("Lookup parameters: {} = {}" , primaryKey .toString (), primaryValue .toString ());
86
86
query .from (tableName ).lookup (primaryKey .toString (), primaryValue .toString ());
87
87
checkConfig (configuration );
88
88
89
89
JsonObject row = query .executeLookup (connection , body );
90
90
if (row .size () != 0 ) {
91
91
LOGGER .info ("Emitting data" );
92
- LOGGER .info (row .toString ());
92
+ LOGGER .trace (row .toString ());
93
93
parameters .getEventEmitter ().emitData (new Message .Builder ().body (row ).build ());
94
94
}
95
95
if (row .size () == 0 && nullableResult ) {
96
96
JsonObjectBuilder emptyResBuilder = Json .createObjectBuilder ();
97
97
emptyResBuilder .add ("empty dataset" , JsonValue .NULL );
98
98
LOGGER .info ("Emitting data" );
99
- LOGGER .info (JSON .stringify (emptyResBuilder .build ()));
99
+ LOGGER .trace (JSON .stringify (emptyResBuilder .build ()));
100
100
parameters .getEventEmitter ().emitData (new Message .Builder ().body (emptyResBuilder .build ()).build ());
101
101
} else if (row .size () == 0 && !nullableResult ) {
102
102
LOGGER .info ("Empty response. Error message will be returned" );
@@ -107,14 +107,15 @@ public void execute(ExecutionParameters parameters) {
107
107
.add (PROPERTY_ID_COLUMN , primaryKey .toString ())
108
108
.add (PROPERTY_LOOKUP_VALUE , primaryValue .toString ())
109
109
.add (PROPERTY_NULLABLE_RESULT , nullableResult ).build ();
110
- LOGGER .info ("Emitting new snapshot {}" , snapshot .toString ());
110
+ LOGGER .trace ("Emitting new snapshot {}" , snapshot .toString ());
111
111
parameters .getEventEmitter ().emitSnapshot (snapshot );
112
112
} catch (SQLException e ) {
113
- LOGGER .error ("Failed to make request" , e .toString ());
113
+ LOGGER .error ("Failed to make request" );
114
+ LOGGER .trace ("Error: {}" , e .toString ());
114
115
throw new RuntimeException (e );
115
116
}
116
117
} catch (SQLException e ) {
117
- LOGGER .error ("Failed to close connection" , e .toString ());
118
+ LOGGER .error ("Failed to close connection: {} " , e .toString ());
118
119
}
119
120
} else {
120
121
LOGGER .error ("Error: Should be one Primary Key" );
0 commit comments