From 75d3af315bc7d4fb1a1d5185fe308c18385534ea Mon Sep 17 00:00:00 2001 From: Filippe Spolti Date: Wed, 28 Dec 2022 10:23:33 -0300 Subject: [PATCH] fix packt plugin (#110) --- .../rebasing/rebot/plugin/packt/notifier/PacktNotifier.java | 5 ++--- .../src/main/resources/application.properties | 6 +++--- rebot-telegram/src/main/resources/application.properties | 5 ++++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/rebot-plugins/rebot-packt-free-learning-plugin/src/main/java/xyz/rebasing/rebot/plugin/packt/notifier/PacktNotifier.java b/rebot-plugins/rebot-packt-free-learning-plugin/src/main/java/xyz/rebasing/rebot/plugin/packt/notifier/PacktNotifier.java index c6c70c6..04e4dc5 100644 --- a/rebot-plugins/rebot-packt-free-learning-plugin/src/main/java/xyz/rebasing/rebot/plugin/packt/notifier/PacktNotifier.java +++ b/rebot-plugins/rebot-packt-free-learning-plugin/src/main/java/xyz/rebasing/rebot/plugin/packt/notifier/PacktNotifier.java @@ -105,9 +105,9 @@ public void populate() { } BufferedReader reader = new BufferedReader(new StringReader(response.body().string())); - // navigate directly to the end of the html to get the product ID and get the 'const metaProductId' value + // navigate directly more or lest to where the product ID is and get the 'const metaProductId' value // it is at the end of the html page. - Optional metaProductId = reader.lines().skip(1616) + Optional metaProductId = reader.lines().skip(1000) .filter(s -> s.contains("const metaProductId")) .map(s -> s.split("=")[1].replace("\'", "").replace(";", "").trim()) .findFirst(); @@ -141,7 +141,6 @@ public void populate() { ); } } catch (final Exception e) { - e.printStackTrace(); log.warnv("Failed to obtain the ebook information: {0}", e.getMessage()); } } diff --git a/rebot-services/rebot-persistence-service/src/main/resources/application.properties b/rebot-services/rebot-persistence-service/src/main/resources/application.properties index f505f42..dde415b 100644 --- a/rebot-services/rebot-persistence-service/src/main/resources/application.properties +++ b/rebot-services/rebot-persistence-service/src/main/resources/application.properties @@ -7,7 +7,7 @@ quarkus.datasource.jdbc.min-size=8 quarkus.hibernate-orm.database.generation=update # set to true to troubleshooting purposes quarkus.hibernate-orm.log.sql=false -quarkus.log.category."org.hibernate.cache".level=DEBUG +quarkus.log.category."org.hibernate.cache".level=INFO # not needed if create-drop database generation is used. # It is required if a old version of ReBot was running @@ -21,8 +21,8 @@ quarkus.log.category."org.hibernate.cache".level=DEBUG # dev %dev.quarkus.datasource.db-kind=h2 %dev.quarkus.datasource.jdbc.url=jdbc:h2:mem:testdb -%dev.quarkus.hibernate-orm.log.sql=true -%dev.quarkus.log.category."org.hibernate".level=DEBUG +%dev.quarkus.hibernate-orm.log.sql=false +%dev.quarkus.log.category."org.hibernate".level=INFO %dev.quarkus.log.category."org.hibernate.cache".level=DEBUG %dev.xyz.rebasing.rebot.telegram.userId=userid %dev.xyz.rebasing.rebot.telegram.token=token diff --git a/rebot-telegram/src/main/resources/application.properties b/rebot-telegram/src/main/resources/application.properties index 89268a1..f54f2da 100644 --- a/rebot-telegram/src/main/resources/application.properties +++ b/rebot-telegram/src/main/resources/application.properties @@ -12,11 +12,14 @@ quarkus.log.file.path=/tmp/quarkus.log quarkus.log.file.level=TRACE quarkus.log.file.format=%d{HH:mm:ss} %-5p [%c{2.}]] (%t) %s%e%n +# log definitions +quarkus.log.category."org.hibernate".level=INFO + # dev %dev.quarkus.log.min-level=TRACE %dev.quarkus.log.console.level=TRACE %dev.quarkus.log.category."xyz.rebasing".level=TRACE -%dev.quarkus.log.category."org.hibernate.cache".level=DEBUG +%dev.quarkus.log.category."org.hibernate.cache".level=INFO %dev.quarkus.log.category."org.jbpm.process".level=TRACE %dev.quarkus.log.category."xyz.rebasing.rebot.plugin.postalcode.utils.BrazilPostalCodeUtils".level=INFO %dev.quarkus.devservices.enabled=false