Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-2320

Package-level loogging breaks custom logging configuration

    XMLWordPrintableJSON

Details

    Description

      objects.rateLimitedLog is initialized during package initialization phase, triggering log.once before log.InitializeLogger() has a chance to apply custom logging configuration. As result, the logging system does not accept custom configuration anymore.

      entrypoint.TestCustomLoggingConfiguration() demonstrates the problem.

      There are several ways to address the problem:

      1. Lazy initialize the package-level logging variable objects.rateLimitedLog.

      2. (preferred) Remove the package-level variable and replace it with an Application instance-level variable, which is also lazily initialized.

      More details available here: https://yunikornworkspace.slack.com/archives/CLNUW68MU/p1704322291697499

      Call stack that demonstrates the problem attached.

      Attachments

        Issue Links

          Activity

            People

              of773 Ovidiu Feodorov
              of773 Ovidiu Feodorov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: