Remove System.out.println and use logging where we can

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.2
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem:

      Java driver has a number of System.out.println commands. These should be logged where appropriate through the logger

      Reproduce:

      shell> find . -name "*.java" -exec grep -H System.out {} \;

      ./src/main/com/mongodb/ReplicaSetStatus.java: System.out.println( _all.get );
      ./src/main/com/mongodb/ReplicaSetStatus.java: System.out.println( status.ensureMaster()._addr );
      ./src/main/com/mongodb/ReplicaSetStatus.java: System.out.println( status.ready() );
      ./src/main/com/mongodb/ReplicaSetStatus.java: System.out.println( "master: " + status.getMaster() + "\t secondary: " + status.getASecondary() );
      ./src/main/com/mongodb/ReplicaSetStatus.java: System.out.println( "-----------------------" );
      ./src/main/com/mongodb/util/SimplePool.java: System.out.println( buf );
      ./src/main/com/mongodb/util/SimplePool.java: System.out.println( "SimplePool [" + _name + "] : " + msg );
      ./src/main/org/bson/BSONEncoder.java: if ( DEBUG ) System.out.println( "putObject : " + name + " [" + o.getClass() + "]" + " # keys " + o.keySet().size() );
      ./src/main/org/bson/BSONEncoder.java: if ( DEBUG ) System.out.println( "\t put thing : " + name );

      Business Case:

      • user expereince

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            Alvin Richards (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: