Project

General

Profile

« Previous | Next » 

Revision 6868

Use a Logger instead of System.out for SystemMetadataMap.

View differences:

src/edu/ucsb/nceas/metacat/dataone/hazelcast/SystemMetadataMap.java
6 6
import java.util.Map;
7 7
import java.util.Set;
8 8

  
9
import org.apache.log4j.Logger;
9 10
import org.dataone.service.types.v1.Identifier;
10 11
import org.dataone.service.types.v1.ObjectInfo;
11 12
import org.dataone.service.types.v1.ObjectList;
......
16 17

  
17 18
import edu.ucsb.nceas.metacat.IdentifierManager;
18 19
import edu.ucsb.nceas.metacat.McdbDocNotFoundException;
20
import edu.ucsb.nceas.metacat.dataone.CNodeService;
19 21

  
20 22
/**
21 23
 * Storage implementation for Hazelcast System Metadata
22 24
 * @author leinfelder
23 25
 *
24 26
 */
25
public class SystemMetadataMap implements MapStore<Identifier, SystemMetadata>, MapLoader<Identifier, SystemMetadata> {
27
public class SystemMetadataMap 
28
    implements MapStore<Identifier, SystemMetadata>, MapLoader<Identifier, SystemMetadata> {
26 29

  
30
  private Logger logMetacat = null;
31

  
27 32
	@Override
28 33
	public void delete(Identifier arg0) {
29 34
		// we do not delete system metadata
......
58 63
	@Override
59 64
	public SystemMetadata load(Identifier pid) {
60 65
		SystemMetadata sm = null;
61
		try {
62
			System.out.println("loading from store: " + pid.getValue());
66
    logMetacat = Logger.getLogger(SystemMetadataMap.class);
67
    
68
    try {
69
			logMetacat.debug("loading from store: " + pid.getValue());
63 70
			sm = IdentifierManager.getInstance().getSystemMetadata(pid.getValue());
64 71
		} catch (McdbDocNotFoundException e) {
65 72
			//throw new RuntimeException(e.getMessage(), e);

Also available in: Unified diff