@@ -157,7 +157,7 @@ namespace Plugin {
157
157
}
158
158
159
159
int8_t MigrationPreparerImplementation::split (std::list<string>& list, string& value, std::string delimiter) {
160
- LOGINFO (" split: %s" , value.c_str ());
160
+ // LOGINFO("split: %s", value.c_str());
161
161
string::size_type start = 0 , pos = 0 ;
162
162
while ((pos = value.find (delimiter, start) )!= std::string::npos) {
163
163
list.emplace_back (value.substr (start, pos - start));
@@ -178,7 +178,7 @@ namespace Plugin {
178
178
}
179
179
// Add the last element without an underscore
180
180
value += *it;
181
- LOGINFO (" join: %s" , value.c_str ());
181
+ // LOGINFO("join: %s", value.c_str());
182
182
return Core::ERROR_NONE;
183
183
}
184
184
@@ -196,7 +196,8 @@ namespace Plugin {
196
196
197
197
uint32_t MigrationPreparerImplementation::write (const string& name, const string &value) {
198
198
199
- LOGINFO (" [WRITE] params={name: %s, value: %s}" , name.c_str (), value.c_str ());
199
+ // LOGINFO("[WRITE] params={name: %s, value: %s}", name.c_str(), value.c_str());
200
+ LOGINFO (" Writing entry for name: %s" , name.c_str ());
200
201
string entry;
201
202
string key = name;
202
203
string newValue = value;
@@ -232,7 +233,8 @@ namespace Plugin {
232
233
233
234
if (!dataStore.Open (false )) {
234
235
LOGERR (" Failed to open migration datastore %s, errno: %d, reason: %s" , DATASTORE_PATH, errno, strerror (errno));
235
- LOGERR (" Failed to create entry for {%s:%s} in migration datastore" , key.c_str (), newValue.c_str ());
236
+ // LOGERR("Failed to create entry for {%s:%s} in migration datastore", key.c_str(), newValue.c_str());
237
+ LOGERR (" Failed to create entry for name: %s in migration datastore" , key.c_str ());
236
238
_dataStoreMutex.unlock ();
237
239
return ERROR_OPEN;
238
240
}
@@ -253,7 +255,8 @@ namespace Plugin {
253
255
string oldValue = _valueEntry[_lineNumber[key] - 2 ];
254
256
255
257
if (oldValue == newValue) {
256
- LOGWARN (" Entry {%s:%s} is already existing in the dataStore, returning success" , oldValue.c_str (), key.c_str ());
258
+ // LOGWARN("Entry {%s:%s} is already existing in the dataStore, returning success", oldValue.c_str(), key.c_str());
259
+ LOGWARN (" Entry for name: %s is already existing in the dataStore, returning success" , key.c_str ());
257
260
_dataStoreMutex.unlock ();
258
261
return Core::ERROR_NONE;
259
262
}
@@ -279,23 +282,26 @@ namespace Plugin {
279
282
return Core::ERROR_NONE;
280
283
}
281
284
result = WEXITSTATUS (result);
282
- LOGERR (" Failed to update entry for {%s:%s} in migration datastore, v_secure_system failed with error %d" ,key.c_str (), newValue.c_str (), result);
285
+ // LOGERR("Failed to update entry for {%s:%s} in migration datastore, v_secure_system failed with error %d",key.c_str(), newValue.c_str(), result);
286
+ LOGERR (" Failed to update entry for name: %s in migration datastore, v_secure_system failed with error %d" ,key.c_str (), result);
283
287
_dataStoreMutex.unlock ();
284
288
return ERROR_WRITE;
285
289
}
286
290
287
291
// Handle subsequent Write request
288
292
if (!dataStore.Open (false )) {
289
293
LOGERR (" Failed to create migration datastore %s, errno: %d, reason: %s" , DATASTORE_PATH, errno, strerror (errno));
290
- LOGERR (" Failed to create entry for {%s:%s} in migration datastore" , key.c_str (), newValue.c_str ());
294
+ // LOGERR("Failed to create entry for {%s:%s} in migration datastore", key.c_str(), newValue.c_str());
295
+ LOGERR (" Failed to create entry for name: %s in migration datastore" , key.c_str ());
291
296
_dataStoreMutex.unlock ();
292
297
return ERROR_OPEN;
293
298
}
294
299
295
300
// append new key-value pair to the dataStore
296
301
if (!dataStore.Position (false , dataStore.Size () - 2 )) {
297
302
LOGERR (" DataStore truncate failed with errno: %d, reason: %s\n " , errno, strerror (errno));
298
- LOGERR (" Failed to create entry for {%s:%s} in migration datastore" , key.c_str (), newValue.c_str ());
303
+ // LOGERR("Failed to create entry for {%s:%s} in migration datastore", key.c_str(), newValue.c_str());
304
+ LOGERR (" Failed to create entry for %s in migration datastore" , key.c_str ());
299
305
dataStore.Close ();
300
306
_dataStoreMutex.unlock ();
301
307
return ERROR_WRITE;
@@ -311,7 +317,7 @@ namespace Plugin {
311
317
312
318
uint32_t MigrationPreparerImplementation::read (const string& name, string &result) {
313
319
314
- LOGINFO (" [READ] params={ name: %s} " , name.c_str ());
320
+ LOGINFO (" Reading entry for name: %s" , name.c_str ());
315
321
string key = name;
316
322
317
323
if (!_fileExist) {
@@ -336,7 +342,7 @@ namespace Plugin {
336
342
337
343
uint32_t MigrationPreparerImplementation::Delete (const string& name) {
338
344
339
- LOGINFO (" [DELETE] params={ name: %s} " , name.c_str ());
345
+ LOGINFO (" Deleting entry for name: %s" , name.c_str ());
340
346
string key = name;
341
347
int result;
342
348
0 commit comments