Skip to content
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

I got the warning log LambdaLoggingAspect has not been applied. #1746

Open
yuuresuzuki opened this issue Oct 7, 2024 · 0 comments
Open

I got the warning log LambdaLoggingAspect has not been applied. #1746

yuuresuzuki opened this issue Oct 7, 2024 · 0 comments

Comments

@yuuresuzuki
Copy link

yuuresuzuki commented Oct 7, 2024

Hi

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.

Originally posted by @yuuresuzuki in #1745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant