Content-Type: multipart/mixed; boundary=Apple-Mail-2-260168580 --Apple-Mail-2-260168580 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: 7bit
Kevin,

Please find a patch attached.  I made sure I steered clear of any of the explicitly reporting-related functionality, and only commented out what I would consider optimization/debugging printlns.  (Personally, I'd just remove them entirely, but I'm trying to not step on any toes.)

BTW, Kevin, do you realize you're not replying to the list?

Thanks,

- Chas

--Apple-Mail-2-260168580 Content-Disposition: attachment; filename=clear-spurious-printlns.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="clear-spurious-printlns.patch" Content-Transfer-Encoding: quoted-printable =0AProperty=20changes=20on:=20.=0A= ___________________________________________________________________=0A= Name:=20svn:ignore=0A=20=20=20-=20.classpath=0A.project=0Atarget=0A= .settings=0A=0A=20=20=20+=20.classpath=0A.project=0Atarget=0A.settings=0A= build=0Adist=0A=0A=0AIndex:=20src/main/java/jdbm/helper/SoftCache.java=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A---=20= src/main/java/jdbm/helper/SoftCache.java=09(revision=2035)=0A+++=20= src/main/java/jdbm/helper/SoftCache.java=09(working=20copy)=0A@@=20= -171,7=20+171,7=20@@=0A=20=20=20=20=20=20*/=0D=0A=20=20=20=20=20= protected=20void=20finalize()=20throws=20Throwable=20{=0D=0A=20=20=20=20=20= =20=20=20=20super.finalize();=0D=0A-=20=20=20=20=20=20=20=20= System.err.println(=20"SoftCache:=20initialCapacity=3D"+_capacity+",=20= loadFactor=3D"+_loadFactor+",=20highTide=3D"+_highTide+",=20= ninserts=3D"+_ninserts);=0D=0A+=20=20=20=20=20=20=20=20= //System.err.println(=20"SoftCache:=20initialCapacity=3D"+_capacity+",=20= loadFactor=3D"+_loadFactor+",=20highTide=3D"+_highTide+",=20= ninserts=3D"+_ninserts);=0D=0A=20=20=20=20=20}=0D=0A=20=20=20=20=20=0D=0A= =20=20=20=20=20/**=0D=0AIndex:=20= src/main/java/jdbm/helper/WeakCache.java=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A---=20= src/main/java/jdbm/helper/WeakCache.java=09(revision=2035)=0A+++=20= src/main/java/jdbm/helper/WeakCache.java=09(working=20copy)=0A@@=20= -178,7=20+178,7=20@@=0A=20=20=20=20=20=20*/=0D=0A=20=20=20=20=20= protected=20void=20finalize()=20throws=20Throwable=20{=0D=0A=20=20=20=20=20= =20=20=20=20super.finalize();=0D=0A-=20=20=20=20=20=20=20=20= System.err.println(=20"WeakCache:=20initialCapacity=3D"+_capacity+",=20= loadFactor=3D"+_loadFactor+",=20highTide=3D"+_highTide+",=20= ninserts=3D"+_ninserts);=0D=0A+=20=20=20=20=20=20=20=20= //System.err.println(=20"WeakCache:=20initialCapacity=3D"+_capacity+",=20= loadFactor=3D"+_loadFactor+",=20highTide=3D"+_highTide+",=20= ninserts=3D"+_ninserts);=0D=0A=20=20=20=20=20}=0D=0A=20=0D=0A=20=20=20=20= =20/**=0D=0A@@=20-197,13=20+197,13=20@@=0A=20=20=20=20=20=20*=20=20=20=20= =20=20=20=20=20would=20have=20experienced=20while=20evicting=20an=20= object=20it=20currently=0D=0A=20=20=20=20=20=20*=20=20=20=20=20=20=20=20=20= cached.=0D=0A=20=20=20=20=20=20*/=0D=0A-=20=20=20=20public=20void=20= put(K=20key,=20V=20value,=20boolean=20dirty,=20Serializer=20ser)=20= throws=20CacheEvictionException=20{=0D=0A+=20=20=20=20public=20void=20= put=20(K=20key,=20V=20value,=20boolean=20dirty,=20Serializer=20ser)=20= throws=20CacheEvictionException=20{=0D=0A=20=20=20=20=20=20=20=20=20if=20= (key=20=3D=3D=20null)=20{=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= throw=20new=20IllegalArgumentException("key=20cannot=20be=20null.");=0D=0A= =20=20=20=20=20=20=20=20=20}=20else=20if=20(value=20=3D=3D=20null)=20{=0D= =0A=20=20=20=20=20=20=20=20=20=20=20=20=20throw=20new=20= IllegalArgumentException("value=20cannot=20be=20null.");=0D=0A=20=20=20=20= =20=20=20=20=20}=0D=0A-=20=20=20=20=20=20=20=20_internal.put(key,=20= value,=20dirty,=20ser=20);=0D=0A+=20=20=20=20=20=20=20=20= _internal.put(key,=20value,=20dirty,=20ser);=0D=0A=20=20=20=20=20=20=20=20= =20removeClearedEntries();=0D=0A=20=20=20=20=20=20=20=20=20= _cacheMap.put(key,=20new=20Entry(key,=20value,=20/*dirty,=20ser,*/=20= _clearQueue));=0D=0A=20=20=20=20=20=20=20=20=20_ninserts++;=0D=0AIndex:=20= src/main/java/jdbm/helper/CacheAll.java=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A---=20= src/main/java/jdbm/helper/CacheAll.java=09(revision=2035)=0A+++=20= src/main/java/jdbm/helper/CacheAll.java=09(working=20copy)=0A@@=20-101,7=20= +101,7=20@@=0A=20=20=20=20=20=20*/=0D=0A=20=20=20=20=20protected=20void=20= finalize()=20throws=20Throwable=20{=0D=0A=20=20=20=20=20=20=20=20=20= super.finalize();=0D=0A-=20=20=20=20=20=20=20=20System.err.println(=20= "CacheAll:=20size=3D"+_hash.size());=0D=0A+=20=20=20=20=20=20=20=20= //System.err.println(=20"CacheAll:=20size=3D"+_hash.size());=0D=0A=20=20=20= =20=20}=0D=0A=20=0D=0A=20=20=20=20=20/**=0D=0AIndex:=20= src/main/java/jdbm/recman/BaseRecordManager.java=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A---=20= src/main/java/jdbm/recman/BaseRecordManager.java=09(revision=2035)=0A+++=20= src/main/java/jdbm/recman/BaseRecordManager.java=09(working=20copy)=0A@@=20= -216,8=20+216,8=20@@=0A=20=20=20=20=20protected=20void=20finalize()=20= throws=20Throwable=0D=0A=20=20=20=20=20{=0D=0A=20=20=20=20=20=20=20=20=20= super.finalize();=0D=0A-=20=20=20=20=20=20=20=20System.err.println(=20"=20= =20serialization=20time:=20"+m_serializationElapsed+"ms");=0D=0A-=20=20=20= =20=20=20=20=20System.err.println(=20"deserialization=20time:=20= "+m_deserializationElapsed+"ms");=0D=0A+=20=20=20=20=20=20=20=20= //System.err.println(=20"=20=20serialization=20time:=20= "+m_serializationElapsed+"ms");=0D=0A+=20=20=20=20=20=20=20=20= //System.err.println(=20"deserialization=20time:=20= "+m_deserializationElapsed+"ms");=0D=0A=20=20=20=20=20}=0D=0A=20=20=20=20= =20=0D=0A=20=20=20=20=20/**=0D=0AIndex:=20= src/main/java/jdbm/recman/RecordFile.java=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A---=20= src/main/java/jdbm/recman/RecordFile.java=09(revision=2035)=0A+++=20= src/main/java/jdbm/recman/RecordFile.java=09(working=20copy)=0A@@=20= -351,7=20+351,7=20@@=0A=20=20=20=20=20RecordFile(String=20fileName)=20= throws=20IOException=20{=0D=0A=20=20=20=20=20=20=20=20=20this.fileName=20= =3D=20fileName;=0D=0A=20=20=20=20=20=20=20=20=20if(=20new=20File(=20= fileName=20+=20extension=20).exists()=20)=20{=0D=0A-=20=20=20=20=20=20=20= =20=09System.err.println("INFO:=20database=20exists:=20"+fileName);=0D=0A= +=20=20=20=20=20=20=20=20=09//System.err.println("INFO:=20database=20= exists:=20"+fileName);=0D=0A=20=20=20=20=20=20=20=20=20}=0D=0A=20=20=20=20= =20=20=20=20=20file=20=3D=20new=20RandomAccessFile(fileName=20+=20= extension,=20"rw");=0D=0A=20=20=20=20=20=20=20=20=20txnMgr=20=3D=20new=20= TransactionManager(this);=0D=0AIndex:=20= src/main/java/jdbm/recman/Provider.java=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A---=20= src/main/java/jdbm/recman/Provider.java=09(revision=2035)=0A+++=20= src/main/java/jdbm/recman/Provider.java=09(working=20copy)=0A@@=20-395,7=20= +395,7=20@@=0A=20=20=20=20=20=20=20=20=20}=0D=0A=20=20=20=20=20=20=20=20=20= if(=20!=20value.equals(=20existingValue=20)=20)=20{=0D=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20//=20Update=20the=20sticky=20option.=0D=0A-=20=20=20= =20=20=20=20=20=20=20=20=20System.err.println(=20"stickyOption::=20= "+name+"=3D"+value=20);=0D=0A+=20=20=20=20=20=20=20=20=20=20=20=20= //System.err.println(=20"stickyOption::=20"+name+"=3D"+value=20);=0D=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20_stickyOptions.setProperty(=20name,=20= value=20);=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20//=20Update=20the=20= sticky=20options=20on=20the=20store.=0D=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20recman.update=0D=0A= --Apple-Mail-2-260168580 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable

On Aug = 19, 2009, at 12:04 PM, Kevin Day wrote:

Unless any of the developers object, I am very open = to this.  If the output is related to an error condition, we should = be throwing exceptions.  If it's just performance printout garbage, = that should not be left in the code = base.
 
These calls must have been added to the = code after the version that we run in production, because we definitely = don't get that sort of output.  I say:  kill those lines = :-)
 
- K
 
Kevin = Day

 
----------------------- Original = Message -----------------------
=
  
From: Chas Emerick <cemerick@SNOWTIDE.COM>
= Cc: 
Date: Tue, 18 Aug 2009 19:50:49 = -0400
Subject: [Jdbm-general] spurious = System.err.println = calls?
  
Looks like jdbm emits a number of (what I would = consider) spurious  
System.err.println calls, which will just = make a mess out of anyone's  
log files. :-)

This is = being done in a variety of places (BaseRecordManager, =  
RecordFile, and Provider at the very least), leading to *lots* = of  
output like:

  serialization time: = 14ms
deserialization time: 11ms
stickyOption:: = jdbm.serializer=3Ddefault
stickyOption:: = jdbm.compressor=3Dnone
INFO: database exists: = /Users/chas/.......

Would a patch be accepted that eliminates = such calls, or at the very  
least, guards them with a DEBUG = flag?

Thanks,

- = Chas

--------------------------------------------------------------= ----------------
Let Crystal Reports handle the reporting - Free = Crystal Reports 2008 30-Day 
trial. Simplify your = report design, integration and deployment - and focus on 
what you do best, core = application codin g. Discover what's new with 
Crystal Reports now. =  http://p.sf.net/sfu/bobj-july
____________= ___________________________________
Jdbm-general mailing list
Jdbm-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jdbm-genera= l


= --Apple-Mail-2-260168580--