Files
NFD/daemon/fw/strategy.cpp
T
Steve DiBenedetto bf6a93da4e core: change logging from environment variable to configuration file-based
GlobalConfigurationFixture uses unit-tests.conf to determine default
and module specific logging levels. Logging will gracefully default to
INFO if unit-tests.conf is not found. See unit-tests.conf.sample for a
sample configuration file.

refs: #1375, #1267

Change-Id: Ib0c4eb4149748e6658f94ef1afa23ddd3072c0fa
2014-03-31 20:46:51 -06:00

62 lines
1.5 KiB
C++

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (C) 2014 Named Data Networking Project
* See COPYING for copyright and distribution information.
*/
#include "strategy.hpp"
#include "forwarder.hpp"
#include "core/logger.hpp"
namespace nfd {
namespace fw {
NFD_LOG_INIT("Strategy");
Strategy::Strategy(Forwarder& forwarder, const Name& name)
: m_name(name)
, m_forwarder(forwarder)
, m_measurements(m_forwarder.getMeasurements(),
m_forwarder.getStrategyChoice(), this)
{
}
Strategy::~Strategy()
{
}
void
Strategy::beforeSatisfyPendingInterest(shared_ptr<pit::Entry> pitEntry,
const Face& inFace, const Data& data)
{
NFD_LOG_DEBUG("beforeSatisfyPendingInterest pitEntry=" << pitEntry->getName() <<
" inFace=" << inFace.getId() << " data=" << data.getName());
}
void
Strategy::beforeExpirePendingInterest(shared_ptr<pit::Entry> pitEntry)
{
NFD_LOG_DEBUG("beforeExpirePendingInterest pitEntry=" << pitEntry->getName());
}
//void
//Strategy::afterAddFibEntry(shared_ptr<fib::Entry> fibEntry)
//{
// NFD_LOG_DEBUG("afterAddFibEntry fibEntry=" << fibEntry->getPrefix());
//}
//
//void
//Strategy::afterUpdateFibEntry(shared_ptr<fib::Entry> fibEntry)
//{
// NFD_LOG_DEBUG("afterUpdateFibEntry fibEntry=" << fibEntry->getPrefix());
//}
//
//void
//Strategy::beforeRemoveFibEntry(shared_ptr<fib::Entry> fibEntry)
//{
// NFD_LOG_DEBUG("beforeRemoveFibEntry fibEntry=" << fibEntry->getPrefix());
//}
} // namespace fw
} // namespace nfd