Commit 6bbe4677 authored by Julian Zobel's avatar Julian Zobel
Browse files

logging in MacLayer

parent 4ae99493
......@@ -50,6 +50,7 @@ import de.tud.kom.p2psim.impl.util.LiveMonitoring.ProgressValue;
import de.tudarmstadt.maki.simonstrator.api.Event;
import de.tudarmstadt.maki.simonstrator.api.Message;
import de.tudarmstadt.maki.simonstrator.api.Monitor;
import de.tudarmstadt.maki.simonstrator.api.Monitor.Level;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.component.core.MonitorComponent.AnalyzerNotAvailableException;
......@@ -249,15 +250,15 @@ public abstract class AbstractMacLayer implements MacLayer {
for (EnergyCommunicationComponent comp : energyComponents) {
if (comp.getPhyType().equals(phy)) {
energyComponent = comp;
break;
}
}
}
if (energyComponent == null) {
// Log.warn("The MAC-Layer did not find an Energy-Component for "
// + phy.toString()
// +
// ". This is fine, if you did not intend to measure energy consumption. Otherwise, please check your configuration!");
if (energyComponent == null) {
Monitor.log(getClass(), Level.INFO, "The MAC-Layer did not find an Energy-Component for "
+ phy.toString() + ". This is fine, if you did not intend to measure energy consumption. "
+ "Otherwise, please check your configuration!", "");
energyComponent = new EnergyComponentStub(phy);
}
......
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