"Process run method failed: " << ex.what());
}
- LOG_DEBUG(agent_logger, DBGLVL_START_SHUT, CTRL_AGENT_RUN_EXIT);
+ LOG_DEBUG(agent_logger, isc::log::DBGLVL_START_SHUT, CTRL_AGENT_RUN_EXIT);
}
isc::data::ConstElementPtr
// this might be the place to do it, once there is a persistence mgr.
// This may also be better in checkQueueStatus.
- LOG_DEBUG(d2_logger, DBGLVL_START_SHUT, DHCP_DDNS_RUN_EXIT);
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_START_SHUT, DHCP_DDNS_RUN_EXIT);
};
}
if (all_clear) {
- LOG_DEBUG(d2_logger, DBGLVL_START_SHUT,
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_START_SHUT,
DHCP_DDNS_CLEARED_FOR_SHUTDOWN)
- .arg(getShutdownTypeStr(shutdown_type_));
+ .arg(getShutdownTypeStr(shutdown_type_));
}
}
isc::data::ConstElementPtr
D2Process::shutdown(isc::data::ConstElementPtr args) {
- LOG_DEBUG(d2_logger, DBGLVL_START_SHUT, DHCP_DDNS_SHUTDOWN_COMMAND)
- .arg(args ? args->str() : "(no arguments)");
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_START_SHUT,
+ DHCP_DDNS_SHUTDOWN_COMMAND)
+ .arg(args ? args->str() : "(no arguments)");
// Default shutdown type is normal.
std::string type_str(getShutdownTypeStr(SD_NORMAL));
isc::data::ConstElementPtr
D2Process::configure(isc::data::ConstElementPtr config_set, bool check_only) {
- LOG_DEBUG(d2_logger, DBGLVL_TRACE_BASIC, DHCP_DDNS_CONFIGURE)
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_TRACE_BASIC, DHCP_DDNS_CONFIGURE)
.arg(check_only ? "check" : "update")
.arg(config_set->str());
// canceling active listening which may generate an IO event, so
// instigate the stop and get out.
try {
- LOG_DEBUG(d2_logger, DBGLVL_START_SHUT,
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_START_SHUT,
DHCP_DDNS_QUEUE_MGR_STOPPING)
- .arg(reconf_queue_flag_ ? "reconfiguration"
- : "shutdown");
+ .arg(reconf_queue_flag_ ? "reconfiguration" : "shutdown");
queue_mgr_->stopListening();
} catch (const isc::Exception& ex) {
// It is very unlikely that we would experience an error
// we can do the reconfigure. In other words, we aren't RUNNING or
// STOPPING.
if (reconf_queue_flag_) {
- LOG_DEBUG(d2_logger, DBGLVL_TRACE_BASIC,
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_TRACE_BASIC,
DHCP_DDNS_QUEUE_MGR_RECONFIGURING);
reconfigureQueueMgr();
}
// @todo This is the initial implementation. If and when D2 is extended
// to support its own commands, this implementation must change. Otherwise
// it should reject all commands as it does now.
- LOG_DEBUG(d2_logger, DBGLVL_TRACE_BASIC, DHCP_DDNS_COMMAND)
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_TRACE_BASIC, DHCP_DDNS_COMMAND)
.arg(command).arg(args ? args->str() : "(no args)");
return (isc::config::createAnswer(COMMAND_INVALID, "Unrecognized command: "
enqueue(ncr);
// Log that we got the request
- LOG_DEBUG(dhcp_to_d2_logger, DBGLVL_TRACE_DETAIL_DATA,
+ LOG_DEBUG(dhcp_to_d2_logger,
+ isc::log::DBGLVL_TRACE_DETAIL_DATA,
DHCP_DDNS_QUEUE_MGR_QUEUE_RECEIVE)
.arg(ncr->getRequestId());
return;
<< ex.what());
}
- LOG_DEBUG(d2_logger, DBGLVL_START_SHUT, DHCP_DDNS_QUEUE_MGR_STARTED);
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_START_SHUT,
+ DHCP_DDNS_QUEUE_MGR_STARTED);
}
void
void
D2QueueMgr::updateStopState() {
mgr_state_ = target_stop_state_;
- LOG_DEBUG(d2_logger, DBGLVL_TRACE_BASIC, DHCP_DDNS_QUEUE_MGR_STOPPED);
+ LOG_DEBUG(d2_logger, isc::log::DBGLVL_TRACE_BASIC,
+ DHCP_DDNS_QUEUE_MGR_STOPPED);
}
// frequently. It will likely achieve max transactions quickly on its own.
if (getQueueCount() > 0) {
if (getTransactionCount() >= max_transactions_) {
- LOG_DEBUG(dhcp_to_d2_logger, DBGLVL_TRACE_DETAIL_DATA,
+ LOG_DEBUG(dhcp_to_d2_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA,
DHCP_DDNS_AT_MAX_TRANSACTIONS).arg(getQueueCount())
.arg(getMaxTransactions());
// There were no eligible jobs. All of the current DHCIDs already have
// transactions pending.
- LOG_DEBUG(dhcp_to_d2_logger, DBGLVL_TRACE_DETAIL_DATA, DHCP_DDNS_NO_ELIGIBLE_JOBS)
- .arg(getQueueCount()).arg(getTransactionCount());
+ LOG_DEBUG(dhcp_to_d2_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA,
+ DHCP_DDNS_NO_ELIGIBLE_JOBS)
+ .arg(getQueueCount()).arg(getTransactionCount());
}
void
if (next_ncr->isForwardChange()) {
if (!cfg_mgr_->forwardUpdatesEnabled()) {
next_ncr->setForwardChange(false);
- LOG_DEBUG(dhcp_to_d2_logger, DBGLVL_TRACE_DETAIL_DATA,
+ LOG_DEBUG(dhcp_to_d2_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA,
DHCP_DDNS_FWD_REQUEST_IGNORED)
.arg(next_ncr->getRequestId())
.arg(next_ncr->toText());
if (next_ncr->isReverseChange()) {
if (!cfg_mgr_->reverseUpdatesEnabled()) {
next_ncr->setReverseChange(false);
- LOG_DEBUG(dhcp_to_d2_logger, DBGLVL_TRACE_DETAIL_DATA,
+ LOG_DEBUG(dhcp_to_d2_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA,
DHCP_DDNS_REV_REQUEST_IGNORED)
.arg(next_ncr->getRequestId())
.arg(next_ncr->toText());
// If there is nothing to actually do, then the request falls on the floor.
// Should we log this?
if (!direction_count) {
- LOG_DEBUG(dhcp_to_d2_logger, DBGLVL_TRACE_DETAIL_DATA,
+ LOG_DEBUG(dhcp_to_d2_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA,
DHCP_DDNS_REQUEST_DROPPED)
.arg(next_ncr->getRequestId())
.arg(next_ncr->toText());
tsig_context_.get());
} catch (const isc::Exception& ex) {
status = DNSClient::INVALID_RESPONSE;
- LOG_DEBUG(d2_to_dns_logger, DBGLVL_TRACE_DETAIL,
+ LOG_DEBUG(d2_to_dns_logger, isc::log::DBGLVL_TRACE_DETAIL,
DHCP_DDNS_INVALID_RESPONSE).arg(ex.what());
}
void
NameChangeTransaction::startTransaction() {
- LOG_DEBUG(d2_to_dns_logger, DBGLVL_TRACE_DETAIL,
+ LOG_DEBUG(d2_to_dns_logger, isc::log::DBGLVL_TRACE_DETAIL,
DHCP_DDNS_STARTING_TRANSACTION)
.arg(getRequestId());
// runModel is exception safe so we are good to call it here.
// It won't exit until we hit the next IO wait or the state model ends.
setDnsUpdateStatus(status);
- LOG_DEBUG(d2_to_dns_logger, DBGLVL_TRACE_DETAIL,
+ LOG_DEBUG(d2_to_dns_logger, isc::log::DBGLVL_TRACE_DETAIL,
DHCP_DDNS_UPDATE_RESPONSE_RECEIVED)
.arg(getRequestId())
.arg(current_server_->toText())
d2_params->getDnsServerTimeout(), tsig_key_);
// Message is on its way, so the next event should be NOP_EVT.
postNextEvent(NOP_EVT);
- LOG_DEBUG(d2_to_dns_logger, DBGLVL_TRACE_DETAIL,
+ LOG_DEBUG(d2_to_dns_logger, isc::log::DBGLVL_TRACE_DETAIL,
DHCP_DDNS_UPDATE_REQUEST_SENT)
.arg(getRequestId())
.arg(comment)
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
//@{
/// @brief Debug level used to log information during server startup.
-const int DBG_DHCP4_START = DBGLVL_START_SHUT;
+const int DBG_DHCP4_START = isc::log::DBGLVL_START_SHUT;
/// @brief Debug level used to log information during server shutdown.
-const int DBG_DHCP4_SHUT = DBGLVL_START_SHUT;
+const int DBG_DHCP4_SHUT = isc::log::DBGLVL_START_SHUT;
/// @brief Debug level used to log receiving commands.
-const int DBG_DHCP4_COMMAND = DBGLVL_COMMAND;
+const int DBG_DHCP4_COMMAND = isc::log::DBGLVL_COMMAND;
/// @brief Debug level used to trace basic operations within the code.
-const int DBG_DHCP4_BASIC = DBGLVL_TRACE_BASIC;
+const int DBG_DHCP4_BASIC = isc::log::DBGLVL_TRACE_BASIC;
/// @brief Debug level used to trace hook related operations
-const int DBG_DHCP4_HOOKS = DBGLVL_TRACE_BASIC;
+const int DBG_DHCP4_HOOKS = isc::log::DBGLVL_TRACE_BASIC;
/// @brief Debug level used to log the traces with some basic data.
///
/// more detailed information in cases when it is warranted and the
/// extraction of the data doesn't impact the server's performance
/// significantly.
-const int DBG_DHCP4_BASIC_DATA = DBGLVL_TRACE_BASIC_DATA;
+const int DBG_DHCP4_BASIC_DATA = isc::log::DBGLVL_TRACE_BASIC_DATA;
/// @brief Debug level used to trace detailed errors.
///
/// packets. (These are not logged at severities of WARN or higher for fear
/// that a set of deliberately invalid packets set to the server could overwhelm
/// the logging.)
-const int DBG_DHCP4_DETAIL = DBGLVL_TRACE_DETAIL;
+const int DBG_DHCP4_DETAIL = isc::log::DBGLVL_TRACE_DETAIL;
/// @brief This level is used to log the contents of packets received and sent.
-const int DBG_DHCP4_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
+const int DBG_DHCP4_DETAIL_DATA = isc::log::DBGLVL_TRACE_DETAIL_DATA;
//@}
-// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
//@{
/// @brief Debug level used to log information during server startup.
-const int DBG_DHCP6_START = DBGLVL_START_SHUT;
+const int DBG_DHCP6_START = isc::log::DBGLVL_START_SHUT;
/// @brief Debug level used to log information during server shutdown.
-const int DBG_DHCP6_SHUT = DBGLVL_START_SHUT;
+const int DBG_DHCP6_SHUT = isc::log::DBGLVL_START_SHUT;
/// @brief Debug level used to log receiving commands.
-const int DBG_DHCP6_COMMAND = DBGLVL_COMMAND;
+const int DBG_DHCP6_COMMAND = isc::log::DBGLVL_COMMAND;
/// @brief Debug level used to trace basic operations within the code.
-const int DBG_DHCP6_BASIC = DBGLVL_TRACE_BASIC;
+const int DBG_DHCP6_BASIC = isc::log::DBGLVL_TRACE_BASIC;
/// @brief Debug level used to trace hook related operations
-const int DBG_DHCP6_HOOKS = DBGLVL_TRACE_BASIC;
+const int DBG_DHCP6_HOOKS = isc::log::DBGLVL_TRACE_BASIC;
/// @brief Debug level used to log the traces with some basic data.
///
/// more detailed information in cases when it is warranted and the
/// extraction of the data doesn't impact the server's performance
/// significantly.
-const int DBG_DHCP6_BASIC_DATA = DBGLVL_TRACE_BASIC_DATA;
+const int DBG_DHCP6_BASIC_DATA = isc::log::DBGLVL_TRACE_BASIC_DATA;
/// @brief Debug level used to trace detailed errors.
///
/// packets. (These are not logged at severities of WARN or higher for fear
/// that a set of deliberately invalid packets set to the server could overwhelm
/// the logging.)
-const int DBG_DHCP6_DETAIL = DBGLVL_TRACE_DETAIL;
+const int DBG_DHCP6_DETAIL = isc::log::DBGLVL_TRACE_DETAIL;
/// @brief This level is used to log the contents of packets received and sent.
-const int DBG_DHCP6_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
+const int DBG_DHCP6_DETAIL_DATA = isc::log::DBGLVL_TRACE_DETAIL_DATA;
//@}
-// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
extern isc::log::Logger command_logger;
// Enumerate configuration elements as they are processed.
-const int DBG_COMMAND = DBGLVL_COMMAND;
+const int DBG_COMMAND = isc::log::DBGLVL_COMMAND;
} // namespace config
} // namespace isc
-// Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
if (error_code.value() == boost::asio::error::operation_aborted) {
// A shutdown cancels all outstanding reads. For this reason,
// it can be an expected event, so log it as a debug message.
- LOG_DEBUG(dhcp_ddns_logger, DBGLVL_TRACE_BASIC,
+ LOG_DEBUG(dhcp_ddns_logger, isc::log::DBGLVL_TRACE_BASIC,
DHCP_DDNS_NCR_UDP_RECV_CANCELED);
result = STOPPED;
} else {
-// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// Defines the levels used to output debug messages from the @c AllocEngine.
/// @brief Traces normal operations
-const int ALLOC_ENGINE_DBG_TRACE = DBGLVL_TRACE_BASIC;
+const int ALLOC_ENGINE_DBG_TRACE = isc::log::DBGLVL_TRACE_BASIC;
/// @brief Records the results of various operations.
///
/// Messages logged at this level will typically contain summary of the
/// data retrieved.
-const int ALLOC_ENGINE_DBG_RESULTS = DBGLVL_TRACE_BASIC_DATA;
+const int ALLOC_ENGINE_DBG_RESULTS = isc::log::DBGLVL_TRACE_BASIC_DATA;
/// @brief Record detailed traces
///
/// Messages logged at this level will log detailed tracing information.
-const int ALLOC_ENGINE_DBG_TRACE_DETAIL = DBGLVL_TRACE_DETAIL;
+const int ALLOC_ENGINE_DBG_TRACE_DETAIL = isc::log::DBGLVL_TRACE_DETAIL;
/// @brief Records detailed results of various operations.
///
/// Messages logged at this level will contain detailed results.
-const int ALLOC_ENGINE_DBG_TRACE_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
+const int ALLOC_ENGINE_DBG_TRACE_DETAIL_DATA = isc::log::DBGLVL_TRACE_DETAIL_DATA;
//@}
-// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// @brief Traces normal operations
///
/// E.g. sending a query to the database etc.
-const int DHCPSRV_DBG_TRACE = DBGLVL_TRACE_BASIC;
+const int DHCPSRV_DBG_TRACE = isc::log::DBGLVL_TRACE_BASIC;
/// @brief Records the results of the lookups
///
/// Using the example of tracing queries from the backend database, this will
/// just record the summary results.
-const int DHCPSRV_DBG_RESULTS = DBGLVL_TRACE_BASIC_DATA;
+const int DHCPSRV_DBG_RESULTS = isc::log::DBGLVL_TRACE_BASIC_DATA;
/// @brief Additional information
///
/// Record detailed tracing. This is generally reserved for tracing access to
/// the lease database.
-const int DHCPSRV_DBG_TRACE_DETAIL = DBGLVL_TRACE_DETAIL;
+const int DHCPSRV_DBG_TRACE_DETAIL = isc::log::DBGLVL_TRACE_DETAIL;
/// @brief Additional information
///
/// Record detailed (and verbose) data on the server.
-const int DHCPSRV_DBG_TRACE_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
+const int DHCPSRV_DBG_TRACE_DETAIL_DATA = isc::log::DBGLVL_TRACE_DETAIL_DATA;
// Trace hook related operations
-const int DHCPSRV_DBG_HOOKS = DBGLVL_TRACE_BASIC;
+const int DHCPSRV_DBG_HOOKS = isc::log::DBGLVL_TRACE_BASIC;
///@}
-// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
///
/// An example of the normal operation is the call to one of the functions
/// which retrieve the reservations or add new reservation.
-const int HOSTS_DBG_TRACE = DBGLVL_TRACE_BASIC;
+const int HOSTS_DBG_TRACE = isc::log::DBGLVL_TRACE_BASIC;
/// @brief Records the results of the lookups
///
/// Messages logged at this level will typically contain summary of the
/// data retrieved.
-const int HOSTS_DBG_RESULTS = DBGLVL_TRACE_BASIC_DATA;
+const int HOSTS_DBG_RESULTS = isc::log::DBGLVL_TRACE_BASIC_DATA;
/// @brief Record detailed traces
///
/// Messages logged at this level will log detailed tracing information.
-const int HOSTS_DBG_TRACE_DETAIL = DBGLVL_TRACE_DETAIL;
+const int HOSTS_DBG_TRACE_DETAIL = isc::log::DBGLVL_TRACE_DETAIL;
/// @brief Records detailed results of lookups.
///
/// Messages logged at this level will contain detailed results.
-const int HOSTS_DBG_TRACE_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
+const int HOSTS_DBG_TRACE_DETAIL_DATA = isc::log::DBGLVL_TRACE_DETAIL_DATA;
///@}
-// Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// Note that higher numbers equate to more verbose (and detailed) output.
// The first level traces normal operations,
-const int EVAL_DBG_TRACE = DBGLVL_TRACE_BASIC;
+const int EVAL_DBG_TRACE = isc::log::DBGLVL_TRACE_BASIC;
// Additional information on the calls. Report the values that were
// popped from or pushed to the value stack.
-const int EVAL_DBG_STACK = DBGLVL_TRACE_DETAIL_DATA;
+const int EVAL_DBG_STACK = isc::log::DBGLVL_TRACE_DETAIL_DATA;
/// @brief Eval Logger
///
-// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// Note that higher numbers equate to more verbose (and detailed) output.
// The first level traces normal operations,
-const int HOOKS_DBG_TRACE = DBGLVL_TRACE_BASIC;
+const int HOOKS_DBG_TRACE = isc::log::DBGLVL_TRACE_BASIC;
// The next level traces each call to hook code.
-const int HOOKS_DBG_CALLS = DBGLVL_TRACE_BASIC_DATA;
+const int HOOKS_DBG_CALLS = isc::log::DBGLVL_TRACE_BASIC_DATA;
// Additional information on the calls. Report each call to a callout (even
// if there are multiple callouts on a hook) and each status return.
-const int HOOKS_DBG_EXTENDED_CALLS = DBGLVL_TRACE_DETAIL_DATA;
+const int HOOKS_DBG_EXTENDED_CALLS = isc::log::DBGLVL_TRACE_DETAIL_DATA;
/// @brief Hooks Logger
void
HttpConnection::stopThisConnection() {
try {
- LOG_DEBUG(http_logger, DBGLVL_TRACE_BASIC, HTTP_CONNECTION_STOP)
+ LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_BASIC,
+ HTTP_CONNECTION_STOP)
.arg(getRemoteEndpointAddressAsText());
connection_pool_.stop(shared_from_this());
} catch (...) {
acceptor_callback_(ec);
if (!ec) {
- LOG_DEBUG(http_logger, DBGLVL_TRACE_DETAIL, HTTP_REQUEST_RECEIVE_START)
+ LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_DETAIL,
+ HTTP_REQUEST_RECEIVE_START)
.arg(getRemoteEndpointAddressAsText())
.arg(static_cast<unsigned>(request_timeout_/1000));
request_timer_.setup(boost::bind(&HttpConnection::requestTimeoutCallback, this),
void
HttpConnection::socketReadCallback(boost::system::error_code, size_t length) {
if (length != 0) {
- LOG_DEBUG(http_logger, DBGLVL_TRACE_DETAIL_DATA, HTTP_DATA_RECEIVED)
+ LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA,
+ HTTP_DATA_RECEIVED)
.arg(length)
.arg(getRemoteEndpointAddressAsText());
}
doRead();
} else {
- LOG_DEBUG(http_logger, DBGLVL_TRACE_DETAIL, HTTP_REQUEST_RECEIVED)
+ LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_DETAIL,
+ HTTP_REQUEST_RECEIVED)
.arg(getRemoteEndpointAddressAsText());
try {
request_->finalize();
}
HttpResponsePtr response = response_creator_->createHttpResponse(request_);
- LOG_DEBUG(http_logger, DBGLVL_TRACE_DETAIL, HTTP_RESPONSE_SEND)
+ LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_DETAIL,
+ HTTP_RESPONSE_SEND)
.arg(response->toBriefString())
.arg(getRemoteEndpointAddressAsText());
asyncSendResponse(response);
void
HttpConnection::requestTimeoutCallback() {
- LOG_DEBUG(http_logger, DBGLVL_TRACE_DETAIL, HTTP_REQUEST_TIMEOUT_OCCURRED)
+ LOG_DEBUG(http_logger, isc::log::DBGLVL_TRACE_DETAIL,
+ HTTP_REQUEST_TIMEOUT_OCCURRED)
.arg(getRemoteEndpointAddressAsText());
HttpResponsePtr response =
response_creator_->createStockHttpResponse(request_,
lib_LTLIBRARIES = libkea-log.la
libkea_log_la_SOURCES =
libkea_log_la_SOURCES += logimpl_messages.cc logimpl_messages.h
-libkea_log_la_SOURCES += log_dbglevels.h
+libkea_log_la_SOURCES += log_dbglevels.cc log_dbglevels.h
libkea_log_la_SOURCES += log_formatter.h log_formatter.cc
libkea_log_la_SOURCES += logger.cc logger.h
libkea_log_la_SOURCES += logger_impl.cc logger_impl.h
-// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2015,2017 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
/// enabling debugging. Symbols are prefixed DBGLVL so as not to clash with
/// DBG_ symbols in the various modules.
-namespace {
+namespace isc {
+namespace log {
/// Process startup/shutdown debug messages. Note that these are _debug_
/// messages, as other messages related to startup and shutdown may be output
/// up, the "server started" message could be output at a severity of INFO.
/// "Server starting" and messages indicating the stages in startup should be
/// debug messages output at this severity.
-///
-/// This is given a value of 0 as that is the level selected if debugging is
-/// enabled without giving a level.
-const int DBGLVL_START_SHUT = 0;
+extern const int DBGLVL_START_SHUT;
/// This debug level is reserved for logging the exchange of messages/commands
/// between processes, including configuration messages.
-const int DBGLVL_COMMAND = 10;
+extern const int DBGLVL_COMMAND;
/// If the commands have associated data, this level is when they are printed.
/// This includes configuration messages.
-const int DBGLVL_COMMAND_DATA = 20;
+extern const int DBGLVL_COMMAND_DATA;
// The following constants are suggested values for common operations.
// Depending on the exact nature of the code, modules may or may not use these
// levels.
/// Trace basic operations.
-const int DBGLVL_TRACE_BASIC = 40;
+extern const int DBGLVL_TRACE_BASIC;
/// Trace data associated with the basic operations.
-const int DBGLVL_TRACE_BASIC_DATA = 45;
+extern const int DBGLVL_TRACE_BASIC_DATA;
/// Trace detailed operations.
-const int DBGLVL_TRACE_DETAIL = 50;
+extern const int DBGLVL_TRACE_DETAIL;
/// Trace data associated with detailed operations.
-const int DBGLVL_TRACE_DETAIL_DATA = 55;
+extern const int DBGLVL_TRACE_DETAIL_DATA;
-} // Anonymous namespace
+} // log namespace
+} // isc namespace
#endif // LOG_DBGLVLS_H
isc::data::ConstElementPtr
DCfgMgrBase::parseConfig(isc::data::ConstElementPtr config_set,
bool check_only) {
- LOG_DEBUG(dctl_logger, DBGLVL_COMMAND,
+ LOG_DEBUG(dctl_logger, isc::log::DBGLVL_COMMAND,
DCTL_CONFIG_START).arg(config_set->str());
if (!config_set) {
return (isc::config::createAnswer(1,
std::string("Can't parse NULL config")));
}
- LOG_DEBUG(dctl_logger, DBGLVL_COMMAND,
+ LOG_DEBUG(dctl_logger, isc::log::DBGLVL_COMMAND,
DCTL_CONFIG_START).arg(config_set->str());
// The parsers implement data inheritance by directly accessing
"Application Process initialization failed: " << ex.what());
}
- LOG_DEBUG(dctl_logger, DBGLVL_START_SHUT, DCTL_STANDALONE).arg(app_name_);
+ LOG_DEBUG(dctl_logger, isc::log::DBGLVL_START_SHUT, DCTL_STANDALONE)
+ .arg(app_name_);
// Step 3 is to load configuration from file.
int rcode;
void
DControllerBase::initProcess() {
- LOG_DEBUG(dctl_logger, DBGLVL_START_SHUT, DCTL_INIT_PROCESS).arg(app_name_);
+ LOG_DEBUG(dctl_logger, isc::log::DBGLVL_START_SHUT, DCTL_INIT_PROCESS)
+ .arg(app_name_);
// Invoke virtual method to instantiate the application process.
try {
void
DControllerBase::runProcess() {
- LOG_DEBUG(dctl_logger, DBGLVL_START_SHUT, DCTL_RUN_PROCESS).arg(app_name_);
+ LOG_DEBUG(dctl_logger, isc::log::DBGLVL_START_SHUT, DCTL_RUN_PROCESS)
+ .arg(app_name_);
if (!process_) {
// This should not be possible.
isc_throw(DControllerBaseError, "Process not initialized");
case SIGINT:
case SIGTERM:
{
- LOG_DEBUG(dctl_logger, DBGLVL_START_SHUT,
+ LOG_DEBUG(dctl_logger, isc::log::DBGLVL_START_SHUT,
DCTL_SHUTDOWN_SIGNAL_RECVD).arg(signum);
isc::data::ElementPtr arg_set;
executeCommand(SHUT_DOWN_COMMAND, arg_set);