appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

fix: logger-not-working-in-plugins

Open AnnaHariprasad5123 opened this issue 5 months ago • 3 comments

Fixes #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 image

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.

AnnaHariprasad5123 avatar Sep 10 '24 12:09 AnnaHariprasad5123