Remove useless linebreaks in log messages

This commit is contained in:
2024-10-12 17:02:39 +02:00
parent cbca7c8f4c
commit e244fff700
4 changed files with 23 additions and 23 deletions

View File

@ -18,7 +18,7 @@ static const char *TAG = "main";
void app_main(void)
{
esp_log_level_set("*", ESP_LOG_VERBOSE);
esp_log_level_set("*", ESP_LOG_INFO);
system_show_free_memory();
@ -31,40 +31,40 @@ void app_main(void)
// Initialize storage
if (storage_init() == false)
{
ESP_LOGE(TAG, "Failed to init storage!\n");
ESP_LOGE(TAG, "Failed to init storage!");
reboot();
}
// Give a name to the device
if (dev_generate_name())
{
ESP_LOGI(TAG, "Generated a new device name\n");
ESP_LOGI(TAG, "Generated a new device name");
}
char *name = dev_name();
ESP_LOGI(TAG, "Dev name: %s\n", name);
ESP_LOGI(TAG, "Dev name: %s", name);
free(name);
// Generate private key, if needed
if (crypto_gen_priv_key())
{
ESP_LOGI(TAG, "Generated device private key!\n");
ESP_LOGI(TAG, "Generated device private key!");
}
ESP_LOGI(TAG, "Device private key:\n");
ESP_LOGI(TAG, "Device private key:");
crypto_print_priv_key();
// Show current private key
char *csr = crypto_get_csr();
ESP_LOGI(TAG, "Current CSR:\n%s\n", csr);
ESP_LOGI(TAG, "Current CSR:\n%s", csr);
free(csr);
// Initialize network stack
ESP_LOGI(TAG, "Initialize network\n");
ESP_LOGI(TAG, "Initialize network");
ethernet_init();
ethernet_wait_for_network();
// Get if secure origin endpoint is known
ESP_LOGI(TAG, "Check secure origin\n");
ESP_LOGI(TAG, "Check secure origin");
if (storage_get_secure_origin(NULL) == 0)
{
char *sec_ori = unsecure_api_get_secure_origin();
@ -78,7 +78,7 @@ void app_main(void)
}
// Print secure origin endpoint for debugging purposes
ESP_LOGI(TAG, "Get secure origin\n");
ESP_LOGI(TAG, "Get secure origin");
char *sec_ori = calloc(SEC_ORIG_LEN, 1);
assert(storage_get_secure_origin(sec_ori) > 0);
ESP_LOGI(TAG, "Current secure origin: %s", sec_ori);
@ -111,7 +111,7 @@ void app_main(void)
// Check current device enrollment status
ESP_LOGI(TAG, "Check enrollment status");
enum DevEnrollmentStatus status = secure_api_get_device_enrollment_status();
ESP_LOGI(TAG, "Current enrollment status: %d\n", status);
ESP_LOGI(TAG, "Current enrollment status: %d", status);
switch (status)
{