RFR: 8327410: Add hostname option for UL file names [v3]
Fredrik Bredberg
fbredberg at openjdk.org
Tue Apr 2 22:56:09 UTC 2024
On Tue, 12 Mar 2024 07:13:02 GMT, Fredrik Bredberg <fbredberg at openjdk.org> wrote:
>> src/hotspot/share/logging/logFileOutput.cpp line 408:
>>
>>> 406: if (hostname != nullptr) {
>>> 407: if (!os::get_host_name(hostname_string, sizeof(hostname_string))) {
>>> 408: int res = jio_snprintf(hostname_string, sizeof(hostname_string), "%s", HostnameFilenamePlaceholder);
>>
>> This seems overkill just to write `%hn` into `hostname_string`. And on error shouldn't we just replace the `%hn` with e.g. `unknown-host`?
>
> I'll change to `unknown-host`.
fixed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18153#discussion_r1548718521
More information about the hotspot-runtime-dev
mailing list