Skip to content

Commit

Permalink
use Logger object
Browse files Browse the repository at this point in the history
  • Loading branch information
darkv committed Dec 12, 2012
1 parent 2923432 commit 326fee1
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.security.SecureRandom;
import java.util.Random;

import org.apache.log4j.Logger;

/**
* <p>
* In the multitude of java GUID generators, I found none that guaranteed
Expand Down Expand Up @@ -119,7 +121,7 @@
* @author Marc A. Mnich
*/
public class ERXRandomGUID {

private static Logger log = Logger.getLogger(ERXRandomGUID.class);
public String valueBeforeMD5 = "";
public String valueAfterMD5 = "";
private static Random myRand;
Expand All @@ -141,7 +143,7 @@ public class ERXRandomGUID {
try {
s_id = InetAddress.getLocalHost().toString();
} catch (UnknownHostException e) {
e.printStackTrace();
log.error(e, e);
}

}
Expand Down Expand Up @@ -183,7 +185,7 @@ private void getRandomGUID(boolean secure) {
try {
md5 = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
System.out.println("Error: " + e);
log.error(e, e);
valueBeforeMD5 = "";
valueAfterMD5 = "";
return;
Expand Down Expand Up @@ -225,7 +227,7 @@ private void getRandomGUID(boolean secure) {
valueAfterMD5 = sb.toString();

} catch (Exception e) {
System.out.println("Error:" + e);
log.error(e, e);
}
}

Expand Down

0 comments on commit 326fee1

Please sign in to comment.