mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-11 14:50:56 +00:00
added more logging
This commit is contained in:
1 parent
5fb51d906d
commit
f67aaa19eb
1 file changed
+3
-2
+3
-2
@@ -185,6 +185,7 @@ public class RacingEventServiceImpl implements RacingEventService, RegattaListen
|
||||
}
|
||||
|
||||
private RacingEventServiceImpl(DomainObjectFactory domainObjectFactory, MongoObjectFactory mongoObjectFactory) {
|
||||
logger.info("Created "+this);
|
||||
tractracDomainFactory = DomainFactory.INSTANCE;
|
||||
this.domainObjectFactory = domainObjectFactory;
|
||||
this.mongoObjectFactory = mongoObjectFactory;
|
||||
@@ -266,14 +267,14 @@ public class RacingEventServiceImpl implements RacingEventService, RegattaListen
|
||||
@Override
|
||||
public RegattaLeaderboard addRegattaLeaderboard(RegattaIdentifier regattaIdentifier, int[] discardThresholds) {
|
||||
Regatta regatta = getRegatta(regattaIdentifier);
|
||||
logger.info("adding regatta leaderboard for regatta "+regatta.getName());
|
||||
logger.info("adding regatta leaderboard for regatta "+regatta==null?"null":regatta.getName()+" to "+this);
|
||||
RegattaLeaderboard result = null;
|
||||
if (regatta != null) {
|
||||
result = new RegattaLeaderboardImpl(regatta, new ScoreCorrectionImpl(), new ResultDiscardingRuleImpl(
|
||||
discardThresholds), new LowerScoreIsBetter());
|
||||
synchronized (leaderboardsByName) {
|
||||
if (leaderboardsByName.containsKey(result.getName())) {
|
||||
throw new IllegalArgumentException("Leaderboard with name " + result.getName() + " already exists");
|
||||
throw new IllegalArgumentException("Leaderboard with name " + result.getName() + " already exists in "+this);
|
||||
}
|
||||
leaderboardsByName.put(result.getName(), result);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user