Skip to content

Commit 683ec90

Browse files
committed
Revert "reduce logging"
This reverts commit deb6c57.
1 parent 19e733b commit 683ec90

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main/java/ru/mystamps/web/service/CountryServiceImpl.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,19 +202,34 @@ public String suggestCountryForUser(Integer userId) {
202202
// if user created a series with a country, let's suggest this country to him
203203
String slug = countryDao.findCountryOfLastCreatedSeriesByUser(userId);
204204
if (slug != null) {
205+
log.info(
206+
"Country {} has been suggested to user #{} from a recently created series",
207+
slug,
208+
userId
209+
);
205210
return slug;
206211
}
207212

208213
// if user created a country, let's suggest this country to him
209214
slug = countryDao.findLastCountryCreatedByUser(userId);
210215
if (slug != null) {
216+
log.info(
217+
"Country {} has been suggested to user #{} as it was created by him recently",
218+
slug,
219+
userId
220+
);
211221
return slug;
212222
}
213223

214224
// user has never created a country but most of the series in his collection
215225
// belong to a specific country, let's suggest this country to him
216226
slug = countryDao.findPopularCountryInCollection(userId);
217227
if (slug != null) {
228+
log.info(
229+
"Country {} has been suggested to user #{} as popular in his collection",
230+
slug,
231+
userId
232+
);
218233
}
219234

220235
return slug;

0 commit comments

Comments
 (0)