Commit 5538d85d authored by Stephen Morris's avatar Stephen Morris

[trac899] Changes as a result of review

parent 862e13c5
......@@ -140,9 +140,16 @@ public:
/// \brief String version of arg.
Formatter& arg(const std::string& arg) {
if (logger_) {
// Note that if we had a message like "%1 %2" and called
// .arg(42).arg("%1"), we would get "42 %1" (i.e. no recursive
// replacements). This is a limitation but not a problem.
// Note that this method does a replacement and returns the
// modified string. If there are multiple invocations of arg() (e.g.
// . logger.info(msgid).arg(xxx).arg(yyy)...), each invocation
// operates on the string returned by the previous one. This
// sequential operation means that if we had a message like "%1 %2",
// and called .arg("%2").arg(42), we would get "42 42"; the first
// call replaces the %1" with "%2" and the second replaces all
// occurrences of "%2" with 42. (Conversely, the sequence
// .arg(42).arg("%1") would return "42 %1" - there are no recursive
// replacements).
replacePlaceholder(message_, arg, ++nextPlaceholder_ );
}
return (*this);
......
......@@ -36,7 +36,7 @@ typedef enum {
NONE = 6 // Disable logging
} Severity;
/// Minimum/maximum debug levels. These are defined wi
/// Minimum/maximum debug levels.
const int MIN_DEBUG_LEVEL = 0;
const int MAX_DEBUG_LEVEL = 99;
......
......@@ -34,8 +34,6 @@ class DerivedLogger : public isc::log::Logger {
public:
DerivedLogger(std::string name) : isc::log::Logger(name)
{}
virtual ~DerivedLogger()
{}
static void reset() {
isc::log::Logger::reset();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment