From eeee67b9e7e0a9478b2a10984dc0f49f6ba98db7 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 14 Jul 2024 19:37:16 +0530 Subject: [PATCH 1/2] Reduced logger level from info to debug --- .../tasks/LetterSoundCorrespondenceUsageCountScheduler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java b/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java index 83ba9085d..c831abf23 100644 --- a/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java +++ b/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java @@ -39,7 +39,7 @@ public synchronized void execute() { List words = wordDao.readAll(); logger.info("words.size(): " + words.size()); for (Word word : words) { - logger.info("word.getText(): " + word.getText()); + logger.debug("word.getText(): " + word.getText()); for (LetterSoundCorrespondence letterSound : word.getLetterSounds()) { letterSoundCorrespondenceFrequencyMap.put(letterSound.getId(), letterSoundCorrespondenceFrequencyMap.getOrDefault(letterSound.getId(), 0) + word.getUsageCount()); From 2e003ed7fe21078fc3887923c6ac1bb870a8eebc Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 15 Jul 2024 21:40:43 +0530 Subject: [PATCH 2/2] reduced logger level from info to debug in for loops of scheduler classes --- .../LetterSoundCorrespondenceUsageCountScheduler.java | 8 ++++---- .../java/ai/elimu/tasks/LetterUsageCountScheduler.java | 2 +- src/main/java/ai/elimu/tasks/ParagraphWordScheduler.java | 6 +++--- .../java/ai/elimu/tasks/SyllableUsageCountScheduler.java | 2 +- src/main/java/ai/elimu/tasks/WordUsageCountScheduler.java | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java b/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java index c831abf23..f851f681d 100644 --- a/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java +++ b/src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java @@ -48,10 +48,10 @@ public synchronized void execute() { // Update the values previously stored in the database for (LetterSoundCorrespondence letterSoundCorrespondence : letterSoundDao.readAll()) { - logger.info("letterSoundCorrespondence.getId(): " + letterSoundCorrespondence.getId()); - logger.info("letterSoundCorrespondence Letters: \"" + letterSoundCorrespondence.getLetters().stream().map(Letter::getText).collect(Collectors.joining()) + "\""); - logger.info("letterSoundCorrespondence Sounds: /" + letterSoundCorrespondence.getSounds().stream().map(Sound::getValueIpa).collect(Collectors.joining()) + "/"); - logger.info("letterSoundCorrespondence.getUsageCount() (before update): " + letterSoundCorrespondence.getUsageCount()); + logger.debug("letterSoundCorrespondence.getId(): " + letterSoundCorrespondence.getId()); + logger.debug("letterSoundCorrespondence Letters: \"" + letterSoundCorrespondence.getLetters().stream().map(Letter::getText).collect(Collectors.joining()) + "\""); + logger.debug("letterSoundCorrespondence Sounds: /" + letterSoundCorrespondence.getSounds().stream().map(Sound::getValueIpa).collect(Collectors.joining()) + "/"); + logger.debug("letterSoundCorrespondence.getUsageCount() (before update): " + letterSoundCorrespondence.getUsageCount()); int newUsageCount = 0; if (letterSoundCorrespondenceFrequencyMap.containsKey(letterSoundCorrespondence.getId())) { diff --git a/src/main/java/ai/elimu/tasks/LetterUsageCountScheduler.java b/src/main/java/ai/elimu/tasks/LetterUsageCountScheduler.java index 7c1bd585a..fddc81bea 100644 --- a/src/main/java/ai/elimu/tasks/LetterUsageCountScheduler.java +++ b/src/main/java/ai/elimu/tasks/LetterUsageCountScheduler.java @@ -55,7 +55,7 @@ public synchronized void execute() { List storyBooks = storyBookDao.readAllOrdered(); logger.info("storyBooks.size(): " + storyBooks.size()); for (StoryBook storyBook : storyBooks) { - logger.info("storyBook.getTitle(): " + storyBook.getTitle()); + logger.debug("storyBook.getTitle(): " + storyBook.getTitle()); List paragraphs = new ArrayList<>(); List storyBookChapters = storyBookChapterDao.readAll(storyBook); diff --git a/src/main/java/ai/elimu/tasks/ParagraphWordScheduler.java b/src/main/java/ai/elimu/tasks/ParagraphWordScheduler.java index 10431a16e..45d0bc737 100644 --- a/src/main/java/ai/elimu/tasks/ParagraphWordScheduler.java +++ b/src/main/java/ai/elimu/tasks/ParagraphWordScheduler.java @@ -50,11 +50,11 @@ public synchronized void execute() { // Look for matches of existing Words in the paragraph's original text List words = new ArrayList<>(); for (String wordInOriginalText : wordsInOriginalText) { - logger.info("wordInOriginalText: \"" + wordInOriginalText + "\""); + logger.debug("wordInOriginalText: \"" + wordInOriginalText + "\""); wordInOriginalText = wordInOriginalText.toLowerCase(); - logger.info("wordInOriginalText (lower-case): \"" + wordInOriginalText + "\""); + logger.debug("wordInOriginalText (lower-case): \"" + wordInOriginalText + "\""); Word word = wordDao.readByText(wordInOriginalText); - logger.info("word: " + word); + logger.debug("word: " + word); words.add(word); } logger.info("words.size(): " + words.size()); diff --git a/src/main/java/ai/elimu/tasks/SyllableUsageCountScheduler.java b/src/main/java/ai/elimu/tasks/SyllableUsageCountScheduler.java index 4a899e98e..628dda524 100644 --- a/src/main/java/ai/elimu/tasks/SyllableUsageCountScheduler.java +++ b/src/main/java/ai/elimu/tasks/SyllableUsageCountScheduler.java @@ -61,7 +61,7 @@ public synchronized void execute() { List storyBooks = storyBookDao.readAllOrdered(); logger.info("storyBooks.size(): " + storyBooks.size()); for (StoryBook storyBook : storyBooks) { - logger.info("storyBook.getTitle(): " + storyBook.getTitle()); + logger.debug("storyBook.getTitle(): " + storyBook.getTitle()); List paragraphs = new ArrayList<>(); List storyBookChapters = storyBookChapterDao.readAll(storyBook); diff --git a/src/main/java/ai/elimu/tasks/WordUsageCountScheduler.java b/src/main/java/ai/elimu/tasks/WordUsageCountScheduler.java index 8b488ba55..44bdf52b5 100644 --- a/src/main/java/ai/elimu/tasks/WordUsageCountScheduler.java +++ b/src/main/java/ai/elimu/tasks/WordUsageCountScheduler.java @@ -55,7 +55,7 @@ public synchronized void execute() { List storyBooks = storyBookDao.readAllOrdered(); logger.info("storyBooks.size(): " + storyBooks.size()); for (StoryBook storyBook : storyBooks) { - logger.info("storyBook.getTitle(): " + storyBook.getTitle()); + logger.debug("storyBook.getTitle(): " + storyBook.getTitle()); List paragraphs = new ArrayList<>(); List storyBookChapters = storyBookChapterDao.readAll(storyBook);