RFR: 8327410: Add hostname option for UL file names

Johan Sjölen jsjolen at openjdk.org
Thu Mar 7 18:34:54 UTC 2024


On Thu, 7 Mar 2024 13:02:21 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:

> Added %hn as way to make the Unified Logging file name include the host name.
> This is done in line with the already existing %p for pid, and %t for time stamp.
> 
> Also the %hn decorator is already used to prepend the host name to each log line. See: The [JDK-8148219](https://bugs.openjdk.org/browse/JDK-8148219).
> 
> Example: `java -Xlog:gc+init:file=frbr_%hn.%p.%t.log -version`
> 
> Tested tier1-tier5.

Hi Fredrik,

I'm sorry but I think this needs some changes :-). This PR saves the hostname regardless if the hostname is requrested as part of the log filename or not. This means that the hostname is present in the heap of the JVM process, but I believe that the hostname should be considered confidential data. We should really only get the hostname if the user explicitly requests this.

@dholmes-ora , could you confirm whether what I'm saying is correct or not?

Also, we will be needing a man page update on this, which is separate to the usual PR process.

Thanks for doing this work!
Johan

-------------

PR Review: https://git.openjdk.org/jdk/pull/18153#pullrequestreview-1923228488


More information about the hotspot-runtime-dev mailing list