[JAVA-190] Remove System.out.println and use logging where we can Created: 14/Oct/10  Updated: 14/Oct/10  Resolved: 14/Oct/10

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 2.2
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Alvin Richards (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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


 Comments   
Comment by Eliot Horowitz (Inactive) [ 14/Oct/10 ]

these are all meant to be System.out explicitly and never happen under normal usage.

Generated at Thu Feb 08 08:51:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.