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

Select LogOutput* directly for stdout and stderr

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 22
    • 17, 21, 22
    • hotspot
    • b24
    • generic
    • generic

    Description

      in unified logging, there are 2 predefined LogOutputs:
      LogStdoutOutput* LogConfiguration::StdoutLog = nullptr;
      LogStderrOutput* LogConfiguration::StderrLog = nullptr;

      They are initialized in LogConfiguration::initialize(). Once VM is set up, they are ready. LogConfiguration::parse_log_arguments() still need to go through normalization when outputstr is "stdout" or "stderr".

      It needs to allocate a tiny buffer (12 bytes) on C_HEAP and jio_snprintf(). it's risky and may return false.

      I think we can specify idx = 0 for stdout and 1 for stderr.
      It's worth noting that it's impossible to delete outputs[0] and [1]. check the assertion of LogConfiguration::delete_output(size_t idx)

      Attachments

        Issue Links

          Activity

            People

              xliu Xin Liu
              xliu Xin Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: