Hi,

This a WIP in order to try to tackle GH-14948, GH-24170 for example. It's today very common to handle logs in stdout, regarding k8s and such 'cloud' platforms., ie

server:
 tomcat:
    accesslog:
      enabled: true
      directory: /dev
      prefix: stdout
      suffix:
 ```

It's also reassuring (for SEC) to make actuator available on another port. Wrong properties can easily leak and bad things may happen.

This is just a draft to see if this could be an answer in order to have the ability to disable the access logs prefix while using actuator on an other port. Most companies that put logs in stdout can easily filter logs with tools like [Splunk](https://www.splunk.com), so putting all those logs in the same output is not a problem at all.

The idea is to add a property to disable access logs prefix for actuator. Default is `true` to keep BC

`management.server.accesslog-prefix=false`

Is this the good direction?

Thanks

**Comment From: mpalourdio**

@mhalbritter I have forced-pushed with your suggestion. I have also taken care of Undertow and Jetty

I have built the source locally, and I have tested the property.
Both `management.server.accesslog-prefix=` && `management.server.accesslog-prefix=whatever` do the job (at least in tomcat)

**Comment From: mpalourdio**

Just wondering if it would not be better to create an inner  `AccessLog` class in `ManagementServerProperties` so the property would be more in sync with `server.tomcat.accesslog.prefix`, and could handle further configuration properties. WDYT?

It just feels a bit weird to configure like this, no ?

server.tomcat.accesslog.prefix=stdout management.server.accesslog-prefix= ```

Comment From: mhalbritter

Yes, we should add an Accesslog inner class to ManagementServerProperties like you suggested.

There's already a server.tomcat.accesslog.prefix which is by default set to access_log. Right now, what happens if I set management.server.accesslog-prefix=management_, i'll end up with an management access log which is named management_access_log because server.tomcat.accesslog.prefix is prefixed with management.server.accesslog-prefix. I wonder if it would be clearer if management.server.accesslog-prefix would override server.tomcat.accesslog.prefix completely.

So to get a management access log called management_access_log, i'd have to set management.server.accesslog-prefix=management_access_log. That would work regardless of the value of the server.tomcat.accesslog.prefix property.

Comment From: mpalourdio

Yes, we should add an Accesslog inner class to ManagementServerProperties like you suggested.

right, will give this a shot

There's already a server.tomcat.accesslog.prefix which is by default set to access_log. Right now, what happens if I set management.server.accesslog-prefix=management_, i'll end up with an management access log which is named management_access_log because server.tomcat.accesslog.prefix is prefixed with management.server.accesslog-prefix. I wonder if it would be clearer if management.server.accesslog-prefix would override server.tomcat.accesslog.prefix completely.

So to get a management access log called management_access_log, i'd have to set management.server.accesslog-prefix=management_access_log. That would work regardless of the value of the server.tomcat.accesslog.prefix property.

That behavior seems counter-intuitive to me. If you have already tweaked server.tomcat.accesslog.prefix for any reason, and then you add this new property, (so you remove server.tomcat.accesslog.prefix because it has become useless), then you decide to remove actuator from your project you would have to reconfigure the tomcat prefix etc.

IMO with this new property, it's good as is without any user intervention and does the only job it's made for.

Comment From: mhalbritter

Flagging this to see what the team thinks about this:

There's already a server.tomcat.accesslog.prefix which is by default set to access_log. Right now, what happens if I set management.server.accesslog-prefix=management_, i'll end up with an management access log which is named management_access_log because server.tomcat.accesslog.prefix is prefixed with management.server.accesslog-prefix. I wonder if it would be clearer if management.server.accesslog-prefix would override server.tomcat.accesslog.prefix completely.

So to get a management access log called management_access_log, i'd have to set management.server.accesslog-prefix=management_access_log. That would work regardless of the value of the server.tomcat.accesslog.prefix property.

Comment From: mpalourdio

Hi, i see this targets 3.5.x milestone. Will this land in further 3.3.next (if any) and 3.4.next ? It's BC and the code has not moved from 3.2.X AFAIK. Thanks for feedback.

Comment From: mhalbritter

Hi - this is labeled as an enhancement, and enhancements are put in minor/major versions only, not in the maintenance one. That means this feature will land in Spring Boot 3.5.0 the earliest. 3.3 and 3.4 will not get that feature.