akshayyn / cloning

Automatically exported from code.google.com/p/cloning
Other
0 stars 0 forks source link

dumpClonedClasses should not use System.out #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Possible alternatives:

* Support a "callback" that can be registered on the Cloner instance
* Refactor the System.out calls into methods that a class can override when 
extending Cloner
* Use a logging framework

The first or second I think are preferable as they won't require inclusion of a 
logging framework although something like slf4j could be used such that an end 
user of the library can include the implement of their choice (or none).

Personally though, even with a logging framework I think there is value is the 
first or second as the end user of the library can plug-in something besides 
logging-- like maybe adding functionality to only log if a cloning clones > X 
objects

Original issue reported on code.google.com by jklap...@gmail.com on 22 May 2014 at 4:53

GoogleCodeExporter commented 8 years ago
this is already implemented.

cloner.setDumpCloned(... implement the interface as per your requirements)

The docs were not very clear and I've updated them.

Original comment by kostas.k...@googlemail.com on 21 Jun 2014 at 8:11

GoogleCodeExporter commented 8 years ago
I think I may have missed that as it's not implemented in the 1.9 artifact. 
That still uses System.out. Looks like 1.9.1 isn't available at Maven Central 
or the referenced Sonatype repo.

Original comment by jklap...@gmail.com on 22 Jun 2014 at 1:25

GoogleCodeExporter commented 8 years ago
hmm, ok will deploy a snapshot by Friday (I can't at the moment as I don't have 
my private key with me to sign the artifacts)

Original comment by kostas.k...@googlemail.com on 23 Jun 2014 at 7:05

GoogleCodeExporter commented 8 years ago
I got some issues uploading to sonatype, so this will take some time...

Original comment by kostas.k...@googlemail.com on 26 Jun 2014 at 10:48

GoogleCodeExporter commented 8 years ago
Were you going to deploy a release or a snapshot? I can deploy locally for my 
testing

Original comment by jklap...@gmail.com on 26 Jun 2014 at 10:58

GoogleCodeExporter commented 8 years ago
well ,you could clone the git repository and do

mvn clean install

to get a local snapshot of 1.9.1

Original comment by kostas.k...@googlemail.com on 26 Jun 2014 at 11:22

GoogleCodeExporter commented 8 years ago
Sounds good.. I already have a clone :)

Original comment by jklap...@gmail.com on 26 Jun 2014 at 11:48