From 966751bc26b44ef8731b8f8278f6bd4aea6b7747 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 13 Jul 2015 13:09:47 +0200 Subject: [PATCH] Renamed log level panic to fatal --- src/debug.cpp | 2 +- src/host.h | 2 +- src/rtp/audio_decoders.cpp | 2 +- src/rtp/video_decoders.cpp | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index 96d55599a..d3f3e3894 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -95,7 +95,7 @@ void log_msg(int level, const char *format, ...) const char *ending = "\033[0m"; switch (level) { - case LOG_LEVEL_PANIC: color = "\033[1;31m"; break; + case LOG_LEVEL_FATAL: color = "\033[1;31m"; break; case LOG_LEVEL_ERROR: color = "\033[0;31m"; break; case LOG_LEVEL_WARNING: color = "\033[0;33m"; break; case LOG_LEVEL_NOTICE: color = "\033[0;32m"; break; diff --git a/src/host.h b/src/host.h index bf652716c..c33a0b99e 100644 --- a/src/host.h +++ b/src/host.h @@ -89,7 +89,7 @@ extern unsigned int cuda_devices[]; extern unsigned int cuda_devices_count; #define LOG_LEVEL_QUIET 0 -#define LOG_LEVEL_PANIC 1 +#define LOG_LEVEL_FATAL 1 #define LOG_LEVEL_ERROR 2 #define LOG_LEVEL_WARNING 3 #define LOG_LEVEL_NOTICE 4 diff --git a/src/rtp/audio_decoders.cpp b/src/rtp/audio_decoders.cpp index 43e08b95f..bcf0f1a8b 100644 --- a/src/rtp/audio_decoders.cpp +++ b/src/rtp/audio_decoders.cpp @@ -482,7 +482,7 @@ int decode_audio_frame(struct coded_data *cdata, void *data, struct pbuf_stats * decoder->audio_decompress = audio_codec_reconfigure(decoder->audio_decompress, audio_codec, AUDIO_DECODER); if(!decoder->audio_decompress) { - log_msg(LOG_LEVEL_PANIC, "Unable to create audio decompress!\n"); + log_msg(LOG_LEVEL_FATAL, "Unable to create audio decompress!\n"); exit_uv(1); return FALSE; } diff --git a/src/rtp/video_decoders.cpp b/src/rtp/video_decoders.cpp index bd43834fd..36c087131 100644 --- a/src/rtp/video_decoders.cpp +++ b/src/rtp/video_decoders.cpp @@ -336,7 +336,7 @@ static void *fec_thread(void *args) { desc = data->frame->fec_params; fec_state = fec::create_from_desc(desc); if(fec_state == NULL) { - log_msg(LOG_LEVEL_PANIC, "[decoder] Unable to initialize FEC.\n"); + log_msg(LOG_LEVEL_FATAL, "[decoder] Unable to initialize FEC.\n"); exit_uv(1); goto cleanup; } @@ -641,13 +641,13 @@ struct state_video_decoder *video_decoder_init(struct module *parent, s->dec_funcs = static_cast(load_library("openssl_decrypt", LIBRARY_CLASS_UNDEFINED, OPENSSL_DECRYPT_ABI_VERSION)); if (!s->dec_funcs) { - log_msg(LOG_LEVEL_PANIC, "UltraGrid was build without OpenSSL support!\n"); + log_msg(LOG_LEVEL_FATAL, "UltraGrid was build without OpenSSL support!\n"); delete s; return NULL; } if (s->dec_funcs->init(&s->decrypt, encryption, MODE_AES128_CTR) != 0) { - log_msg(LOG_LEVEL_PANIC, "Unable to create decompress!\n"); + log_msg(LOG_LEVEL_FATAL, "Unable to create decompress!\n"); delete s; return NULL; } @@ -665,7 +665,7 @@ struct state_video_decoder *video_decoder_init(struct module *parent, return NULL; } if(!s->postprocess) { - log_msg(LOG_LEVEL_PANIC, "Initializing postprocessor \"%s\" failed.\n", postprocess); + log_msg(LOG_LEVEL_FATAL, "Initializing postprocessor \"%s\" failed.\n", postprocess); delete s; exit_uv(129); return NULL; @@ -1586,7 +1586,7 @@ int decode_video_frame(struct coded_data *cdata, void *decoder_data, struct pbuf decoder->received_vid_desc.width = 0; // just for sure, that we reconfigure in next iteration log_msg(LOG_LEVEL_NOTICE, "%s. Check if it is correct.\n", get_video_mode_description(decoder->video_mode)); } else { - log_msg(LOG_LEVEL_PANIC, "[decoder] Unknown video mode!\n"); + log_msg(LOG_LEVEL_FATAL, "[decoder] Unknown video mode!\n"); exit_uv(1); } // we need skip this frame (variables are illegal in this iteration