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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.2
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: