]> git.sesse.net Git - casparcg/blobdiff - common/log.cpp
[logging] Suppress the logging of full path names in stack traces so that only the...
[casparcg] / common / log.cpp
index 31a34577617694555741f1e021b5d342bb45bca8..1ad6a38f72f93ef5090183677fc48b9767640829 100644 (file)
@@ -141,9 +141,9 @@ void my_formatter(bool print_all_characters, const boost::log::record_view& rec,
 }
 
 namespace internal{
-       
+
 void init()
-{      
+{
        boost::log::add_common_attributes();
        typedef boost::log::sinks::asynchronous_sink<boost::log::sinks::wtext_ostream_backend> stream_sink_type;
 
@@ -323,4 +323,14 @@ void print_child(
                print_child(level, indent + (elem.empty() ? L"" : elem + L"."), child.first, child.second);
 }
 
+const char* remove_source_prefix(const char* file)
+{
+       auto found = boost::ifind_first(file, get_source_prefix().c_str());
+
+       if (found)
+               return found.end();
+       else
+               return file;
+}
+
 }}