From e571e2c52e93e0dc794a620a7bb6a67f4cf0adb2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 23 Feb 2023 23:26:19 +0100 Subject: [PATCH] Cleanup: remove capture_asdcp_logs() from header. --- src/lib/util.cc | 55 +++++++++++++++++++++++++------------------------ src/lib/util.h | 1 - 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/lib/util.cc b/src/lib/util.cc index 20d85cff4..bab74583c 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -360,6 +360,34 @@ dcpomatic_setup_path_encoding () #endif } + +class LogSink : public Kumu::ILogSink +{ +public: + LogSink () {} + LogSink (LogSink const&) = delete; + LogSink& operator= (LogSink const&) = delete; + + void WriteEntry(const Kumu::LogEntry& entry) override { + Kumu::AutoMutex L(m_lock); + WriteEntryToListeners(entry); + if (entry.TestFilter(m_filter)) { + string buffer; + entry.CreateStringWithOptions(buffer, m_options); + LOG_GENERAL("asdcplib: %1", buffer); + } + } +}; + + +void +capture_asdcp_logs () +{ + static LogSink log_sink; + Kumu::SetDefaultLogSink(&log_sink); +} + + /** Call the required functions to set up DCP-o-matic's static arrays, etc. * Must be called from the UI thread, if there is one. */ @@ -1012,33 +1040,6 @@ start_of_thread (string) #endif -class LogSink : public Kumu::ILogSink -{ -public: - LogSink () {} - LogSink (LogSink const&) = delete; - LogSink& operator= (LogSink const&) = delete; - - void WriteEntry(const Kumu::LogEntry& entry) override { - Kumu::AutoMutex L(m_lock); - WriteEntryToListeners(entry); - if (entry.TestFilter(m_filter)) { - string buffer; - entry.CreateStringWithOptions(buffer, m_options); - LOG_GENERAL("asdcplib: %1", buffer); - } - } -}; - - -void -capture_asdcp_logs () -{ - static LogSink log_sink; - Kumu::SetDefaultLogSink(&log_sink); -} - - string error_details(boost::system::error_code ec) { diff --git a/src/lib/util.h b/src/lib/util.h index 61922325d..d53fc06e0 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -93,7 +93,6 @@ extern dcp::Size scale_for_display (dcp::Size s, dcp::Size display_container, dc extern dcp::DecryptedKDM decrypt_kdm_with_helpful_error (dcp::EncryptedKDM kdm); extern boost::filesystem::path default_font_file (); extern void start_of_thread (std::string name); -extern void capture_asdcp_logs (); extern std::string error_details(boost::system::error_code ec); extern bool contains_assetmap(boost::filesystem::path dir); -- 2.30.2