-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: logger-not-working-in-plugins #36231
fix: logger-not-working-in-plugins #36231
Conversation
WalkthroughThis pull request introduces two new dependencies to the Changes
Assessment against linked issues
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
app/server/appsmith-plugins/pom.xml (1)
69-73
: Nice work adding the SLF4J Simple dependency! 🙌The SLF4J Simple dependency provides a basic logging implementation that outputs logs to the console. This is a good starting point and will allow you to see the logs during development and testing.
However, for a production application, you might want to consider using a more robust logging implementation like Logback or Log4j2. These logging frameworks offer advanced features such as log rotation, log filtering, and the ability to write logs to different destinations (e.g., files, databases).
But for now, the SLF4J Simple dependency is a good choice to get started with logging. Well done! 😊
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- app/server/appsmith-plugins/pom.xml (1 hunks)
Additional comments not posted (1)
app/server/appsmith-plugins/pom.xml (1)
64-68
: Great job adding the SLF4J API dependency! 👍Adding the SLF4J API is an excellent choice. It provides a standardized logging interface, allowing you to decouple your application from the specific logging implementation. This dependency will enable you to use the SLF4J API for logging throughout your application, making it easier to manage and maintain logging statements.
Keep up the good work! 🌟
@AnnaHariprasad5123 thanks for this fix! |
Hi @NilanshBansal, I replaced all System.out.println to log.debug. Could you check once. |
Hi @NilanshBansal, Could you check once. Let me know if any changes required. |
@AnnaHariprasad5123 can you also remove the method stopAndLogTimeInMillisWithSysOut() from Stopwatch.java and also replace all the usages of this method with |
Hi @NilanshBansal, I replaced all of them with with stopAndLogTimeInMillis(). Could you check now. |
@AnnaHariprasad5123 I tried pulling and executing the changes locally, but I am not seeing some logs from PostgresPlugin.java. Line 247 in 55f428c
Can you check the reasons for this. |
...erver/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java
Outdated
Show resolved
Hide resolved
...erver/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java
Outdated
Show resolved
Hide resolved
...erver/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java
Outdated
Show resolved
Hide resolved
...erver/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java
Outdated
Show resolved
Hide resolved
...erver/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java
Outdated
Show resolved
Hide resolved
...r/appsmith-plugins/databricksPlugin/src/main/java/com/external/plugins/DatabricksPlugin.java
Outdated
Show resolved
Hide resolved
...r/appsmith-plugins/databricksPlugin/src/main/java/com/external/plugins/DatabricksPlugin.java
Outdated
Show resolved
Hide resolved
...ver/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java
Outdated
Show resolved
Hide resolved
@AnnaHariprasad5123 were you able to work on the changes suggested? And also fix the logging issue? |
I changed all the logs. Now, I am checking the issue |
Thank You, can you please commit the changes done until now, this will help us to review the rest of the things while you work on resolving the logger issue 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java (1)
Line range hint
12-24
: The current discount and fee structure might not be the best approach.While the intention to reward customer loyalty is great, the implementation of a flat $20 fee on discounted bills could actually negate the benefit of the discount, especially for smaller purchases or marginal loyalty tiers.
For example, a customer with 3 years of loyalty making a $100 purchase would receive a 10% discount, bringing their total to $90. But after adding the $20 fee, their final bill is $110, which is more than if they had no loyalty discount at all! This might lead to customer dissatisfaction, as the loyalty program could paradoxically increase their bill.
Consider revising either the discount percentages or the flat fee application to better align with customer incentives. Perhaps a percentage-based fee or a minimum purchase amount for the fee to apply could help ensure the discounts always benefit the customer.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (25)
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/Stopwatch.java (0 hunks)
- app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java (19 hunks)
- app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/AnthropicPlugin.java (4 hunks)
- app/server/appsmith-plugins/appsmithAiPlugin/src/main/java/com/external/plugins/AppsmithAiPlugin.java (5 hunks)
- app/server/appsmith-plugins/arangoDBPlugin/src/main/java/com/external/plugins/ArangoDBPlugin.java (9 hunks)
- app/server/appsmith-plugins/awsLambdaPlugin/src/main/java/com/external/plugins/AwsLambdaPlugin.java (5 hunks)
- app/server/appsmith-plugins/databricksPlugin/src/main/java/com/external/plugins/DatabricksPlugin.java (7 hunks)
- app/server/appsmith-plugins/dynamoPlugin/src/main/java/com/external/plugins/DynamoPlugin.java (7 hunks)
- app/server/appsmith-plugins/elasticSearchPlugin/src/main/java/com/external/plugins/ElasticSearchPlugin.java (7 hunks)
- app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java (10 hunks)
- app/server/appsmith-plugins/googleAiPlugin/src/main/java/com/external/plugins/GoogleAiPlugin.java (3 hunks)
- app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java (6 hunks)
- app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java (2 hunks)
- app/server/appsmith-plugins/mongoPlugin/src/main/java/com/external/plugins/MongoPlugin.java (17 hunks)
- app/server/appsmith-plugins/mssqlPlugin/src/main/java/com/external/plugins/MssqlPlugin.java (10 hunks)
- app/server/appsmith-plugins/mysqlPlugin/src/main/java/com/external/plugins/MySqlPlugin.java (17 hunks)
- app/server/appsmith-plugins/openAiPlugin/src/main/java/com/external/plugins/OpenAiPlugin.java (4 hunks)
- app/server/appsmith-plugins/oraclePlugin/src/main/java/com/external/plugins/OraclePlugin.java (10 hunks)
- app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java (22 hunks)
- app/server/appsmith-plugins/redisPlugin/src/main/java/com/external/plugins/RedisPlugin.java (6 hunks)
- app/server/appsmith-plugins/redshiftPlugin/src/main/java/com/external/plugins/RedshiftPlugin.java (13 hunks)
- app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java (3 hunks)
- app/server/appsmith-plugins/saasPlugin/src/main/java/com/external/plugins/SaasPlugin.java (5 hunks)
- app/server/appsmith-plugins/smtpPlugin/src/main/java/com/external/plugins/SmtpPlugin.java (8 hunks)
- app/server/appsmith-plugins/snowflakePlugin/src/main/java/com/external/plugins/SnowflakePlugin.java (13 hunks)
Files not reviewed due to no reviewable changes (1)
- app/server/appsmith-interfaces/src/main/java/com/appsmith/external/helpers/Stopwatch.java
Files skipped from review due to trivial changes (7)
- app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java
- app/server/appsmith-plugins/awsLambdaPlugin/src/main/java/com/external/plugins/AwsLambdaPlugin.java
- app/server/appsmith-plugins/elasticSearchPlugin/src/main/java/com/external/plugins/ElasticSearchPlugin.java
- app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java
- app/server/appsmith-plugins/openAiPlugin/src/main/java/com/external/plugins/OpenAiPlugin.java
- app/server/appsmith-plugins/oraclePlugin/src/main/java/com/external/plugins/OraclePlugin.java
- app/server/appsmith-plugins/redisPlugin/src/main/java/com/external/plugins/RedisPlugin.java
Files skipped from review as they are similar to previous changes (16)
- app/server/appsmith-plugins/anthropicPlugin/src/main/java/com/external/plugins/AnthropicPlugin.java
- app/server/appsmith-plugins/appsmithAiPlugin/src/main/java/com/external/plugins/AppsmithAiPlugin.java
- app/server/appsmith-plugins/arangoDBPlugin/src/main/java/com/external/plugins/ArangoDBPlugin.java
- app/server/appsmith-plugins/databricksPlugin/src/main/java/com/external/plugins/DatabricksPlugin.java
- app/server/appsmith-plugins/dynamoPlugin/src/main/java/com/external/plugins/DynamoPlugin.java
- app/server/appsmith-plugins/googleAiPlugin/src/main/java/com/external/plugins/GoogleAiPlugin.java
- app/server/appsmith-plugins/googleSheetsPlugin/src/main/java/com/external/plugins/GoogleSheetsPlugin.java
- app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java
- app/server/appsmith-plugins/mongoPlugin/src/main/java/com/external/plugins/MongoPlugin.java
- app/server/appsmith-plugins/mssqlPlugin/src/main/java/com/external/plugins/MssqlPlugin.java
- app/server/appsmith-plugins/mysqlPlugin/src/main/java/com/external/plugins/MySqlPlugin.java
- app/server/appsmith-plugins/redshiftPlugin/src/main/java/com/external/plugins/RedshiftPlugin.java
- app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
- app/server/appsmith-plugins/saasPlugin/src/main/java/com/external/plugins/SaasPlugin.java
- app/server/appsmith-plugins/smtpPlugin/src/main/java/com/external/plugins/SmtpPlugin.java
- app/server/appsmith-plugins/snowflakePlugin/src/main/java/com/external/plugins/SnowflakePlugin.java
Hi @NilanshBansal, log statements are visible in console now. I have added scope as provided for slf4j dependencies in parent pom of appsmith-plugins and removed slf4j exclusion from pf4j dependency. I have checked some of the plugins with test- configurations action only. Could you check all logs in all plugins from your end. |
Thank You @AnnaHariprasad5123. I am checking this |
Thanks @AnnaHariprasad5123 for your valuable contribution! We highly appreciate your efforts in making Appsmith better ❤️ |
Fixes #36073
Hi @NilanshBansal
Issue :
Missing Logging Implementation :
Solution :
The solution is to add a logging implementation to the plugins parent pom. In this case, you can add the slf4j-simple dependency to your pom.xml file. This will provide a simple logging implementation that will output log statements to the console.
Explanation:
provides the SLF4J API, which is the interface for logging.
Screenshots :
Amazon S3 Plugin and Postgres Plugin
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Improvements