Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4521

Simplify logging enabled and formatting checks

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • None
    • None

    Description

      Instead of doing:

                      if (LOGGER.isWarnEnabled()) {
                          LOGGER.warn(format("Exception thrown raising server opening event to listener %s", cur), e);
                      }
      

      Follow the org.slf4j pattern in the code of:

      void warn(String var1, Object... var2);
      

      So then you could do:

      LOGGER.warn("Exception thrown raising server opening event to listener {}", cur, e);
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: