Commit 406cb1fd authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac738] Adjust debug level when some messages are output

parent 925ac83b
......@@ -27,18 +27,19 @@ namespace auth {
/// the b10-auth program. Higher numbers equate to more verbose (and detailed)
/// output.
// The first level traces start-up, recorded as every components starts.
// Debug messages indicating normal startup are logged at this debug level.
const int DBG_AUTH_START = 10;
// This level traces more detailed high-level operations (mainly within
// commands.cc)
// Debug level used to log setting information (such as configuration changes).
const int DBG_AUTH_OPS = 30;
// Trace detailed operations. This is the normal debug level when debugging
// the module.
// Trace detailed operations, including errors raised when processing invalid
// packets. (These are not logged at severities of WARN or higher for fear
// that a set of deliberately invalid packets set to the authoritative server
// could overwhelm the logging.)
const int DBG_AUTH_DETAIL = 50;
// Output detailed messages
// This level is used to log the contents of packets received and sent.
const int DBG_AUTH_MESSAGES = 70;
/// Define the logger for the "auth" module part of b10-auth. We could define
......
......@@ -31,8 +31,7 @@ message contains the reason for the failure.
% AUTH_CONFIG_CHANNEL_CREATED configuration session channel created
This is a debug message indicating that authoritative server has created
the channel to the configuration manager.
It is issued during server
the channel to the configuration manager. It is issued during server
startup is an indication that the initialization is proceeding normally.
% AUTH_CONFIG_CHANNEL_ESTABLISHED configuration session channel established
......
......@@ -361,10 +361,10 @@ AuthSrv::setMemoryDataSrc(const isc::dns::RRClass& rrclass,
"Memory data source is not supported for RR class "
<< rrclass);
} else if (!impl_->memory_datasrc_ && memory_datasrc) {
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_MEM_DATASRC_ENABLED)
LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_MEM_DATASRC_ENABLED)
.arg(rrclass);
} else if (impl_->memory_datasrc_ && !memory_datasrc) {
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_MEM_DATASRC_DISABLED)
LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_MEM_DATASRC_DISABLED)
.arg(rrclass);
}
impl_->memory_datasrc_ = memory_datasrc;
......@@ -603,7 +603,7 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, MessagePtr message,
// The incoming notify must contain exactly one question for SOA of the
// zone name.
if (message->getRRCount(Message::SECTION_QUESTION) != 1) {
LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_NOTIFY_QUESTIONS)
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_NOTIFY_QUESTIONS)
.arg(message->getRRCount(Message::SECTION_QUESTION));
makeErrorMessage(message, buffer, Rcode::FORMERR(), verbose_mode_,
tsig_context);
......@@ -611,7 +611,7 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, MessagePtr message,
}
ConstQuestionPtr question = *message->beginQuestion();
if (question->getType() != RRType::SOA()) {
LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_NOTIFY_RRTYPE)
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_NOTIFY_RRTYPE)
.arg(question->getType().toText());
makeErrorMessage(message, buffer, Rcode::FORMERR(), verbose_mode_,
tsig_context);
......@@ -630,7 +630,7 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, MessagePtr message,
// silent about such cases, but there doesn't seem to be anything we can
// improve at the primary server side by sending an error anyway.
if (xfrin_session_ == NULL) {
LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_NO_XFRIN);
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_NO_XFRIN);
return (false);
}
......@@ -656,13 +656,12 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, MessagePtr message,
int rcode;
parsed_answer = parseAnswer(rcode, answer);
if (rcode != 0) {
LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_ZONEMGR_ERROR)
LOG_ERROR(auth_logger, AUTH_ZONEMGR_ERROR)
.arg(parsed_answer->str());
return (false);
}
} catch (const Exception& ex) {
LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_ZONEMGR_COMMS)
.arg(ex.what());
LOG_ERROR(auth_logger, AUTH_ZONEMGR_COMMS).arg(ex.what());
return (false);
}
......
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