]> git.sesse.net Git - casparcg/blobdiff - core/thumbnail_generator.cpp
Diagnostic logging now logs the contextual information channel and layer just as...
[casparcg] / core / thumbnail_generator.cpp
index f08e2f97384902840e6382c3f27c3290fa5a6d6d..aded7f7fe0b36659a5bc9e34248702455ab9ca6e 100644 (file)
@@ -239,6 +239,7 @@ public:
 
        void generate_thumbnail(const boost::filesystem::path& file)
        {
+               auto media_file_with_extension = get_relative(file, media_path_);
                auto media_file = get_relative_without_extension(file, media_path_);
                auto png_file = thumbnails_path_ / (media_file.wstring() + L".png");
                std::promise<void> thumbnail_ready;
@@ -258,13 +259,14 @@ public:
                        }
                        catch (...)
                        {
-                               CASPAR_LOG(debug) << L"Thumbnail producer failed to initialize for " << media_file;
+                               CASPAR_LOG_CURRENT_EXCEPTION_AT_LEVEL(debug);
+                               CASPAR_LOG(info) << L"Thumbnail producer failed to initialize for " << media_file_with_extension << L". Turn on log level debug to see more information.";
                                return;
                        }
 
                        if (producer == frame_producer::empty())
                        {
-                               CASPAR_LOG(trace) << L"No appropriate thumbnail producer found for " << media_file;
+                               CASPAR_LOG(debug) << L"No appropriate thumbnail producer found for " << media_file_with_extension;
                                return;
                        }
 
@@ -289,14 +291,15 @@ public:
                        }
                        catch (...)
                        {
-                               CASPAR_LOG(debug) << L"Thumbnail producer failed to create thumbnail for " << media_file;
+                               CASPAR_LOG_CURRENT_EXCEPTION_AT_LEVEL(debug);
+                               CASPAR_LOG(info) << L"Thumbnail producer failed to create thumbnail for " << media_file_with_extension << L". Turn on log level debug to see more information.";
                                return;
                        }
 
                        if (raw_frame == draw_frame::empty()
                                        || raw_frame == draw_frame::late())
                        {
-                               CASPAR_LOG(debug) << L"No thumbnail generated for " << media_file;
+                               CASPAR_LOG(debug) << L"No thumbnail generated for " << media_file_with_extension;
                                return;
                        }
 
@@ -321,7 +324,7 @@ public:
                        try
                        {
                                boost::filesystem::last_write_time(png_file, boost::filesystem::last_write_time(file));
-                               CASPAR_LOG(debug) << L"Generated thumbnail for " << media_file;
+                               CASPAR_LOG(info) << L"Generated thumbnail for " << media_file_with_extension;
                        }
                        catch (...)
                        {
@@ -329,7 +332,7 @@ public:
                        }
                }
                else
-                       CASPAR_LOG(debug) << L"No thumbnail generated for " << media_file;
+                       CASPAR_LOG(debug) << L"No thumbnail generated for " << media_file_with_extension;
        }
 };