Project

General

Profile

« Previous | Next » 

Revision 9128

Added by Jing Tao over 9 years ago

Use the log to the replace system.out.print.

View differences:

src/edu/ucsb/nceas/metacat/IdentifierManager.java
975 975
                        SystemMetadata sysmeta = HazelcastService.getInstance().getSystemMetadataMap().get(guid);
976 976
                        if(sysmeta.getObsoletedBy() == null) {
977 977
                            //type 1 end
978
                            System.out.println("has a type 1 end for sid "+sid.getValue());
978
                            logMetacat.debug(""+guidStr+" is a type 1 end for sid "+sid.getValue());
979 979
                            pid = guid;
980 980
                            endsCount++;
981 981
                        } else {
......
985 985
                                Identifier sidInObsoletedBy = obsoletedBySysmeta.getSeriesId();
986 986
                                if(sidInObsoletedBy == null|| !sidInObsoletedBy.equals(sid)) {
987 987
                                    // type 2 end
988
                                    System.out.println("has a type 2 end for sid "+sid.getValue());
988
                                    logMetacat.debug(""+guidStr+" is a type 2 end for sid "+sid.getValue());
989 989
                                    pid = guid;
990 990
                                    endsCount++;
991 991
                                }
......
1007 1007
                                if(count == 0) {
1008 1008
                                    //the exception (another object in the chain (has the same series id) that obsoletes the missing object) doesn't exist
1009 1009
                                    // it is a type 2 end
1010
                                    System.out.println("has a type 2 end for sid "+sid.getValue());
1010
                                    logMetacat.debug(""+guidStr+" is a type 2 end for sid "+sid.getValue());
1011 1011
                                    pid = guid;
1012 1012
                                    endsCount++;
1013 1013
                                } else if (count ==1) {
......
1023 1023
                    }
1024 1024
                    if(endsCount == 1) {
1025 1025
                        //it has one end and it is an ideal chain. We already assign the guid to the pid. So do nothing.
1026
                        System.out.println("It is an ideal for sid "+sid.getValue());
1026
                        logMetacat.info("It is an ideal for sid "+sid.getValue());
1027 1027
                    }
1028 1028
                    if(hasError || endsCount >1) {
1029 1029
                        // it is not an ideal chain, use the one with latest upload date(the first one in the result set since we have the desc order)
1030
                        System.out.println("It is NOT an ideal for sid "+sid.getValue());
1030
                        logMetacat.info("It is NOT an ideal for sid "+sid.getValue());
1031 1031
                        pid = firstOne;
1032 1032
                    }
1033 1033
                } else {

Also available in: Unified diff