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

Add logging at INFO level if AOT is enabled and working #32396

Closed
dsyer opened this issue Sep 15, 2022 · 3 comments
Closed

Add logging at INFO level if AOT is enabled and working #32396

dsyer opened this issue Sep 15, 2022 · 3 comments
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@dsyer
Copy link
Member

dsyer commented Sep 15, 2022

Currently there is no visual clue that it is working, so you don't know if you set the property right or not.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 15, 2022
@sbrannen
Copy link
Member

sbrannen commented Sep 15, 2022

I realize this issue is about the main application, but it's worth pointing out that the TestContext framework already logs an INFO message for the org.springframework.test.context.cache log category each time an AOT-optimized ApplicationContext is loaded.

In tests you'll see something like the following.

15:25:13.111 [main] INFO  o.s.t.c.c.DefaultCacheAwareContextLoaderDelegate - Loading ApplicationContext in AOT mode for [MergedContextConfiguration@656ec00d testClass = BasicSpringJupiterSharedConfigTests, locations = '{}', classes = '{class org.springframework.test.context.aot.samples.basic.BasicTestConfiguration}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{test.engine = jupiter}', contextCustomizers = set[[empty]], contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]

@sbrannen

This comment was marked as outdated.

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 29, 2022
@philwebb philwebb added this to the 3.0.x milestone Sep 29, 2022
@mhalbritter mhalbritter added the theme: aot An issue related to Ahead-of-time processing label Oct 17, 2022
@mhalbritter mhalbritter modified the milestones: 3.0.x, 3.0.0-RC1 Oct 17, 2022
@mhalbritter mhalbritter reopened this Oct 18, 2022
@mhalbritter
Copy link
Contributor

Applications running in AOT mode now log something like this:

Starting AOT-processed SampleSimpleApplication using Java 17.0.4.1 on fedora with PID 267858

while non-AOT applications log this:

Starting SampleSimpleApplication using Java 17.0.4.1 on fedora with PID 267858

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

5 participants