RFR: 8265961: Fix comments in logging.properties [v2]

Pavel Rappo prappo at openjdk.java.net
Mon Apr 26 17:26:09 UTC 2021


On Mon, 26 Apr 2021 15:48:18 GMT, Mark Reinhold <mr at openjdk.org> wrote:

>> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rollback "in" -> "with"; remove more trailing whitespace
>
> src/java.logging/share/conf/logging.properties line 5:
> 
>> 3: #
>> 4: # You can use a different file by specifying a filename
>> 5: # in the java.util.logging.config.file system property.
> 
> Unless the `java.util.logging.config` property contains more than one item of information, the original "with" is more appropriate here.

Is it because in this case "with" is similar to "by" and "using" in the sense that "with" conveys that the system property acts as a "tool" with which the effect, specifying a filename, is achieved?

> src/java.logging/share/conf/logging.properties line 46:
> 
>> 44: java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
>> 45: 
>> 46: # Limit the messages that are printed on the console to INFO and above.
> 
> "Limit the messages ..." could be more direct. Consider "Only print messages to the console if they have level INFO or above."

Understood and thanks. That said, I will not use what you suggested for the sake of consistency: the "limit the messages" phrasing is also used in the API:


    /**
     * Set the log level specifying which message levels will be
     * logged by this {@code Handler}.  Message levels lower than this
     * value will be discarded.
     * <p>
     * The intention is to allow developers to turn on voluminous
     * logging, but to limit the messages that are sent to certain
     * {@code Handlers}.
     *
     * @param newLevel   the new value for the log level
     * @throws  SecurityException  if a security manager exists and if
     *             the caller does not have {@code LoggingPermission("control")}.
     */
    public synchronized void setLevel(Level newLevel) throws SecurityException {

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

PR: https://git.openjdk.java.net/jdk/pull/3688


More information about the core-libs-dev mailing list