Select LogOutput* directly for stdout and stderr

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: 17, 21, 22
    • Component/s: hotspot
    • b24
    • generic
    • generic

      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)

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

              Created:
              Updated:
              Resolved: