diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/log/Logger.cpp | 2 | ||||
-rw-r--r-- | cpp/src/qpid/log/Options.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/log/Selector.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/log/Selector.h | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/qpid/log/Logger.cpp b/cpp/src/qpid/log/Logger.cpp index c483ed2379..fd9ab14c63 100644 --- a/cpp/src/qpid/log/Logger.cpp +++ b/cpp/src/qpid/log/Logger.cpp @@ -40,7 +40,7 @@ using namespace std; typedef sys::Mutex::ScopedLock ScopedLock; inline void Logger::enable_unlocked(Statement* s) { - s->enabled=selector.isEnabled(s->level, s->file); + s->enabled=selector.isEnabled(s->level, s->function); } struct OstreamOutput : public Logger::Output { diff --git a/cpp/src/qpid/log/Options.cpp b/cpp/src/qpid/log/Options.cpp index a945d5eb35..41a15dcf9f 100644 --- a/cpp/src/qpid/log/Options.cpp +++ b/cpp/src/qpid/log/Options.cpp @@ -43,13 +43,13 @@ Options::Options(const std::string& name) : qpid::Options(name), ("trace,t", optValue(trace), "Enables all logging" ) ("log-enable", optValue(selectors, "RULE"), ("Enables logging for selected levels and components. " - "RULE is in the form 'LEVEL[+][:COMPONENT]' " + "RULE is in the form 'LEVEL[+][:PATTERN]' " "Levels are one of: \n\t "+levels.str()+"\n" "For example:\n" "\t'--log-enable warning+' " "logs all warning, error and critical messages.\n" "\t'--log-enable debug:framing' " - "logs debug messages from the framing component. " + "logs debug messages from the framing namespace. " "This option can be used multiple times").c_str()) ("log-time", optValue(time, "yes|no"), "Include time in log messages") diff --git a/cpp/src/qpid/log/Selector.cpp b/cpp/src/qpid/log/Selector.cpp index e8cef2b17d..994421d0ff 100644 --- a/cpp/src/qpid/log/Selector.cpp +++ b/cpp/src/qpid/log/Selector.cpp @@ -52,12 +52,12 @@ Selector::Selector(const Options& opt){ boost::bind(&Selector::enable, this, _1)); } -bool Selector::isEnabled(Level level, const std::string& file) { +bool Selector::isEnabled(Level level, const std::string& function) { for (std::vector<std::string>::iterator i=substrings[level].begin(); i != substrings[level].end(); ++i) { - if (file.find(*i) != std::string::npos) + if (function.find(*i) != std::string::npos) return true; } return false; diff --git a/cpp/src/qpid/log/Selector.h b/cpp/src/qpid/log/Selector.h index bba3f05bfc..7c98bc6f8f 100644 --- a/cpp/src/qpid/log/Selector.h +++ b/cpp/src/qpid/log/Selector.h @@ -57,7 +57,7 @@ class Selector { void enable(const std::string& enableStr); /** True if level is enabld for file. */ - bool isEnabled(Level level, const std::string& file); + bool isEnabled(Level level, const std::string& function); private: std::vector<std::string> substrings[LevelTraits::COUNT]; |