LogComponentAll does not enable logging

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 1.12.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Fully Compatible
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      There is a logging design oversight in which enabling logging with "options.LogComponentAll" does not result in the publication of logs. This issue arises because the "LevelComponentEnabled" method on the internal logger object fails to account for this specific use case. To resolve this, it is recommended to extend the method as follows:
       

      func (logger *Logger) LevelComponentEnabled(level Level, component Component) bool {
          return logger.ComponentLevels[component] >= level ||
              logger.ComponentLevels[ComponentAll] >= level
      } 

              Assignee:
              Preston Vasquez
              Reporter:
              Preston Vasquez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: