Suzuki Yuu
Suzuki Yuu

Reputation: 7

I got the warning log LambdaLoggingAspect has not been applied

I added the powertools-logging dependency on our project.

And I build our project, and success. but I got the warning message as follow.

[INFO] --- aspectj:1.13.1:compile (default) @ our_project_name ---
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[WARNING] advice defined in software.amazon.lambda.powertools.logging.internal.LambdaLoggingAspect has not been applied [Xlint:adviceDidNotMatch]
    /my_home_directory/.m2/repository/software/amazon/lambda/powertools-logging/1.18.0/powertools-logging-1.18.0.jar!software/amazon/lambda/powertools/logging/internal/LambdaLoggingAspect.class:0

I add the dependency in the pom.xml as follow.

            <dependency>
                <groupId>software.amazon.lambda</groupId>
                <artifactId>powertools-logging</artifactId>
                <version>1.18.0</version>
            </dependency>
            <dependency>
                <groupId>org.aspectj</groupId>
                <artifactId>aspectjrt</artifactId>
                <version>1.9.20.1</version>
            </dependency>
・
・
・
            <plugin>
                <groupId>dev.aspectj</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.13.1</version>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.9.20.1</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <forceAjcCompile>true</forceAjcCompile>
                    <sources/>
                    <weaveDirectories>
                        <weaveDirectory>${project.build.directory}/classes</weaveDirectory>
                    </weaveDirectories>
                    <source>11</source>
                    <target>11</target>
                    <complianceLevel>11</complianceLevel>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>software.amazon.lambda</groupId>
                            <artifactId>powertools-logging</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

I build by jdk 11.

Why is this happen? If you have any idea, let me know how to fix it.

Or if I can ignore it, let me know too.

I investigated the github repository.

Upvotes: 0

Views: 31

Answers (0)

Related Questions