diff --git a/src/core/logging/Logging.cpp b/src/core/logging/Logging.cpp index 60fc970bc461b770558d9dd674ef5e0060ca639d..0c3718d0f37ad16ae845828d22349b6bbc595ec8 100644 --- a/src/core/logging/Logging.cpp +++ b/src/core/logging/Logging.cpp @@ -22,6 +22,7 @@ #include "Logging.h" #include "core/Filesystem.h" +#include "core/Regex.h" #include <ctime> @@ -195,6 +196,23 @@ std::string Logging::createLog( const std::string & type, const std::string & me } +bool Logging::isInIgnoreCallerPaths( const std::vector< walberla::regex > & regexes, + const std::string & callerPath, const int line ) const +{ + if( !regexes.empty() ) + { + std::stringstream callerPathAndLine; + callerPathAndLine << callerPath << ":" << line; + + for( auto regex = regexes.begin(); regex != regexes.end(); ++regex ) + if( walberla::regex_search( callerPathAndLine.str(), *regex ) ) + return true; + } + + return false; +} + + } // namespace logging } // namespace walberla diff --git a/src/core/logging/Logging.h b/src/core/logging/Logging.h index d3671e0ea3910bc7736710bfb7110930ff299600..1a43778516e837e874fed0dda040c25508b93c06 100644 --- a/src/core/logging/Logging.h +++ b/src/core/logging/Logging.h @@ -140,8 +140,8 @@ private: inline Logging(); - inline bool isInIgnoreCallerPaths( const std::vector< walberla::regex > & regexes, - const std::string & callerPath, const int line ) const; + bool isInIgnoreCallerPaths( const std::vector< walberla::regex > & regexes, + const std::string & callerPath, const int line ) const; inline void logError ( const std::string & message, const std::string & callerPath, const int line ); inline void logDevel ( const std::string & message, const std::string & callerPath, const int line ); @@ -306,24 +306,6 @@ inline bool Logging::logTracing( const std::string & /*callerPath*/, const int / -inline bool Logging::isInIgnoreCallerPaths( const std::vector< walberla::regex > & regexes, - const std::string & callerPath, const int line ) const -{ - if( !regexes.empty() ) - { - std::stringstream callerPathAndLine; - callerPathAndLine << callerPath << ":" << line; - - for( auto regex = regexes.begin(); regex != regexes.end(); ++regex ) - if( walberla::regex_search( callerPathAndLine.str(), *regex ) ) - return true; - } - - return false; -} - - - inline void Logging::logError( const std::string & message, const std::string & callerPath, const int line ) { #ifdef WALBERLA_THREAD_SAFE_LOGGING