#include <string>
#include <locale>
+#include <functional>
+#include <memory>
namespace caspar { namespace log {
}
void add_file_sink(const std::wstring& folder);
+std::shared_ptr<void> add_preformatted_line_sink(std::function<void(std::string line)> formatted_line_sink);
typedef boost::log::sources::wseverity_logger_mt<boost::log::trivial::severity_level> caspar_logger;
catch(...){}
#define CASPAR_LOG_CURRENT_EXCEPTION() try{\
- CASPAR_LOG(error) << caspar::u16(boost::current_exception_diagnostic_information()) << L"Caught at (" << caspar::get_thread_info().name << L"):\n" << caspar::get_call_stack();\
+ CASPAR_LOG(error) << caspar::u16(boost::current_exception_diagnostic_information()) << L"Caught at (" << caspar::get_thread_info().name << L"):\n" << caspar::get_call_stack();\
}\
catch(...){}
-
+
+#define CASPAR_LOG_CURRENT_EXCEPTION_AT_LEVEL(lvl) try{\
+ CASPAR_LOG(lvl) << caspar::u16(boost::current_exception_diagnostic_information()) << L"Caught at (" << caspar::get_thread_info().name << L"):\n" << caspar::get_call_stack();\
+ }\
+ catch(...){}
+
void set_log_level(const std::wstring& lvl);
void print_child(