-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Bug]: Logger does not work from the /appsmith-plugins directory #36073
Comments
Hey @NilanshBansal could you assign me this issue? It's my first time doing an open source contribution, and i feel like this would be a good first issue. |
@vuongdovu please go ahead. Once you have raised the PR, please tag @appsmithorg/query-js-pod for review |
@NilanshBansal what is the best place to ask others questions in regards to fixing this bug? Is it the discord? |
@vuongdovu you can raise your queries in the comments on this github issue. |
Hey @NilanshBansal can I also work on this issue? It's my first time doing an open source contribution, and i feel like this would be a good first issue. |
Yes @VanshRuhela please go ahead |
@AnnaHariprasad5123 will you be interested in picking up this issue? |
Hi @NilanshBansal, I will work on this |
Hi @NilanshBansal, Could you review the pr. |
…f github.com:AnnaHariprasad5123/appsmith into chore/issue-36073/shadow-36231
Fixes appsmithorg#36073 Hi @NilanshBansal **Issue :** **Missing Logging Implementation :** - Without a logging implementation (such as SLF4J Simple or Logback) in the project's classpath, the logging statements in the plugins cannot be executed. - As a result, no log output is being printed to the terminal. **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. ``` <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.36</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.7.36</version> </dependency> ``` **Explanation:** - slf4j-api provides the SLF4J API, which is the interface for logging. provides the SLF4J API, which is the interface for logging. - slf4j-simple provides a simple implementation of the SLF4J API, which is responsible for actually printing the log messages to the console. **Screenshots :** Amazon S3 Plugin and Postgres Plugin  <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Enhanced logging capabilities with the integration of SLF4J API and SLF4J Simple implementations. - **Improvements** - Improved log management and output formatting for better monitoring and debugging across various plugins, transitioning from standard output to structured logging. - Refined logging practices in multiple plugins to support better maintainability and performance. - Removed method for console logging from the Stopwatch class to streamline logging practices. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Is there an existing issue for this?
Description
On adding
log.debug()
,log.info()
in PostgresPlugin.java (and any other file in the /appsmith-plugins directory), these log statements are not printed to the console.appsmith/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java
Line 386 in f02b448
appsmith/app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java
Line 658 in f02b448
Attempted to Fix
#35568 (comment)
Steps To Reproduce
Configure the server locally and check for logs in the terminal after configuring postgres datasource.
Public Sample App
No response
Environment
Production
Severity
Low (Cosmetic UI issues)
Issue video log
No response
Version
Appsmith 2d8892f3
The text was updated successfully, but these errors were encountered: