[logback-dev] [Bug 127] LoggerComparator sorts incorrectly

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Fri Feb 15 02:24:18 CET 2008


http://bugzilla.qos.ch/show_bug.cgi?id=127





------- Comment #2 from mark_z at charter.net  2008-02-15 02:24 -------
Good point!

  public int compare(Logger l1, Logger l2) {
    if(l1.getName().equals(l2.getName())){
      return 0;
    }
    if(l1.getName().equals(LoggerContext.ROOT_NAME)){
      return -1;
    }
    if(l2.getName().equals(LoggerContext.ROOT_NAME)){
      return 1;
    }
    return l1.getName().compareTo(l2.getName());
  }


-- 
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the logback-dev mailing list