Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8353868

[macos] Logs no longer appear in /var/log/system.log

XMLWordPrintable

    • b01
    • b03
    • os_x

      Logs are no longer written to /var/log/system.log as in previous versions (e.g., 8u451). Instead they are only in macOS’s unified logging system accessible through log stream. This change seems to impact various logs.

      To Reproduce the issue (e.g.,JRE008-003-gui-444):
      # Create the default properties file
      sudo rm -rf "/Library/Application Support/Oracle/Java/java.settings.cfg"
      sudo mkdir -p "/Library/Application Support/Oracle/Java"
      sudo touch "/Library/Application Support/Oracle/Java/java.settings.cfg"
      echo "WEB_JAVA=Enable" | sudo tee -a "/Library/Application Support/Oracle/Java/java.settings.cfg"

      # Set unexpected permissions on default property file
      sudo chmod 444 "/Library/Application Support/Oracle/Java/java.settings.cfg"

      ## Invoke and install the JRE ##

      # Verify that the log file contains correct contents

      Expected:
      1. Logs including error messages, should appear in /var/log/system.log.
      uadmin@JPG-MAC-X64-601 ~ % sudo cat /var/log/system.log | grep "No write permissions for install config file. Exiting..." | tail -1
      Apr 7 11:41:12 other-mac-x64-17-sca javasettings[44793]: No write permissions for install config file. Exiting...

      2. Error messages related to permission issues, such as "No write permissions for install config file" should display in a consistent format without the full file path.

      Actual:
      1. Logs no longer appear in /var/log/system.log.
      uadmin@JPG-MAC-X64-601 ~ % sudo cat /var/log/system.log | grep "No write permissions for install config file. Exiting..." | tail -1
      uadmin@JPG-MAC-X64-601 ~ %

      2. Logs are now only in macOS’s unified logging system and can be found using log stream.
      3. The error message format has changed. Previously, it appeared as:
      uadmin@other-mac-x64-17-sca ~ % log stream --predicate 'eventMessage contains "No write permissions"' --info
      Filtering the log data using "composedMessage CONTAINS "No write permissions""
      Timestamp Thread Type Activity PID TTL
      2025-04-07 11:41:12.634272+0100 0x85db45 Default 0x0 44793 0 javasettings: No write permissions for install config file. Exiting...

      But now it appears with the full file path:
      uadmin@other-mac-x64-17-sca ~ % log stream --predicate 'eventMessage contains "No write permissions"' --info
      Filtering the log data using "composedMessage CONTAINS "No write permissions""
      Timestamp Thread Type Activity PID TTL
      2025-04-07 11:51:16.259982+0100 0x85f0d8 Default 0x0 44967 0 javasettings: No write permissions for install config file /Library/Application Support/Oracle/Java/java.settings.cfg. Exiting...

      Approximately 30 tests are affected by this logging change.
      This is a regression and cannot be reproduced in 8u451 and 8u441.

            almatvee Alexander Matveev
            aelhoumamsem Abdelkarim EL HOUMAM SEMLALI
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: