Skip to content

Commit 9323681

Browse files
committed
Change logging from Error to Verbose when not found and default available
1 parent a29962e commit 9323681

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

libraries/Preferences/src/Preferences.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ int8_t Preferences::getChar(const char* key, const int8_t defaultValue){
291291
}
292292
esp_err_t err = nvs_get_i8(_handle, key, &value);
293293
if(err){
294-
log_e("nvs_get_i8 fail: %s %s", key, nvs_error(err));
294+
log_v("nvs_get_i8 fail: %s %s", key, nvs_error(err));
295295
}
296296
return value;
297297
}
@@ -303,7 +303,7 @@ uint8_t Preferences::getUChar(const char* key, const uint8_t defaultValue){
303303
}
304304
esp_err_t err = nvs_get_u8(_handle, key, &value);
305305
if(err){
306-
log_e("nvs_get_u8 fail: %s %s", key, nvs_error(err));
306+
log_v("nvs_get_u8 fail: %s %s", key, nvs_error(err));
307307
}
308308
return value;
309309
}
@@ -315,7 +315,7 @@ int16_t Preferences::getShort(const char* key, const int16_t defaultValue){
315315
}
316316
esp_err_t err = nvs_get_i16(_handle, key, &value);
317317
if(err){
318-
log_e("nvs_get_i16 fail: %s %s", key, nvs_error(err));
318+
log_v("nvs_get_i16 fail: %s %s", key, nvs_error(err));
319319
}
320320
return value;
321321
}
@@ -327,7 +327,7 @@ uint16_t Preferences::getUShort(const char* key, const uint16_t defaultValue){
327327
}
328328
esp_err_t err = nvs_get_u16(_handle, key, &value);
329329
if(err){
330-
log_e("nvs_get_u16 fail: %s %s", key, nvs_error(err));
330+
log_v("nvs_get_u16 fail: %s %s", key, nvs_error(err));
331331
}
332332
return value;
333333
}
@@ -339,7 +339,7 @@ int32_t Preferences::getInt(const char* key, const int32_t defaultValue){
339339
}
340340
esp_err_t err = nvs_get_i32(_handle, key, &value);
341341
if(err){
342-
log_e("nvs_get_i32 fail: %s %s", key, nvs_error(err));
342+
log_v("nvs_get_i32 fail: %s %s", key, nvs_error(err));
343343
}
344344
return value;
345345
}
@@ -351,7 +351,7 @@ uint32_t Preferences::getUInt(const char* key, const uint32_t defaultValue){
351351
}
352352
esp_err_t err = nvs_get_u32(_handle, key, &value);
353353
if(err){
354-
log_e("nvs_get_u32 fail: %s %s", key, nvs_error(err));
354+
log_v("nvs_get_u32 fail: %s %s", key, nvs_error(err));
355355
}
356356
return value;
357357
}
@@ -371,7 +371,7 @@ int64_t Preferences::getLong64(const char* key, const int64_t defaultValue){
371371
}
372372
esp_err_t err = nvs_get_i64(_handle, key, &value);
373373
if(err){
374-
log_e("nvs_get_i64 fail: %s %s", key, nvs_error(err));
374+
log_v("nvs_get_i64 fail: %s %s", key, nvs_error(err));
375375
}
376376
return value;
377377
}
@@ -383,7 +383,7 @@ uint64_t Preferences::getULong64(const char* key, const uint64_t defaultValue){
383383
}
384384
esp_err_t err = nvs_get_u64(_handle, key, &value);
385385
if(err){
386-
log_e("nvs_get_u64 fail: %s %s", key, nvs_error(err));
386+
log_v("nvs_get_u64 fail: %s %s", key, nvs_error(err));
387387
}
388388
return value;
389389
}

0 commit comments

Comments
 (0)