Project

General

Profile

« Previous | Next » 

Revision 5434

Added by berkley over 14 years ago

changing d1 log format

View differences:

src/edu/ucsb/nceas/metacat/dataone/CrudService.java
330 330
        }
331 331

  
332 332
        // For Metadata and Data, insert the system metadata into the object store too
333
        insertSystemMetadata(sysmeta, sessionData);
333
        String sysmetaLocalId = insertSystemMetadata(sysmeta, sessionData);
334 334
        logMetacat.debug("Returning from CrudService.create()");
335 335
        EventLog.getInstance().log(metacatUrl,
336 336
                username, localId, "create");
......
342 342
        {
343 343
            System.out.println("Could not get localId for logging purposes: " + e.getMessage());
344 344
        }
345
        logCrud.info("create localId:" + localId + " guid:" + guid.getValue());
345
        //logCrud.info("create localId:" + localId + " guid:" + guid.getValue());
346
        logCrud.info("create D1GUID:" + guid.getValue() + ":D1SCIMETADATA:" + localId +
347
                ":D1SYSMETA:" + sysmetaLocalId + ":");
346 348
        return guid;
347 349
    }
348 350
    
......
371 373
            //change the obsoletes field of the new systemMetadata (sm.new) to point to the id of the old one
372 374
            sysmeta.addObsolete(obsoletedGuid);
373 375
            //insert sm.new
374
            insertSystemMetadata(sysmeta, sessionData);
376
            String sysmetaLocalId = insertSystemMetadata(sysmeta, sessionData);
375 377
            
376 378
            boolean isScienceMetadata = isScienceMetadata(sysmeta);
377 379
            if(isScienceMetadata)
......
393 395
            }
394 396
            EventLog.getInstance().log(metacatUrl,
395 397
                    username, im.getLocalId(guid.getValue()), "update");
396
            logCrud.info("update localId:" + im.getLocalId(guid.getValue()) + " guid:" + guid.getValue());
398
            logCrud.info("update D1GUID:" + guid.getValue() + ":D1SCIMETADATA:" + im.getLocalId(guid.getValue())  +
399
                    ":D1SYSMETA:" + sysmetaLocalId + ":");
400
            //logCrud.info("update localId:" + im.getLocalId(guid.getValue()) + " guid:" + guid.getValue());
397 401
            return guid;
398 402
        }
399 403
        catch(Exception e)
......
820 824
            
821 825
            EventLog.getInstance().log(metacatUrl,
822 826
                    username, im.getLocalId(guid.getValue()), "read");
823
            logCrud.info("get localId:" + localId + " guid:" + guid.getValue());
827
            logCrud.info("get D1GUID:" + guid.getValue() + ":D1SCIMETADATA:" + 
828
                    localId + ":");
829
            //logCrud.info("get localId:" + localId + " guid:" + guid.getValue());
824 830
            return objectStream;
825 831

  
826 832
        } catch (McdbDocNotFoundException e) {
......
1055 1061
            }
1056 1062
            EventLog.getInstance().log(metacatUrl,
1057 1063
                    username, im.getLocalId(guid.getValue()), "read");
1058
            logCrud.info("getSystemMetadata localId: " + localId + " guid:" + guid.getValue());
1064
            logCrud.info("getSystemMetadata D1GUID:" + guid.getValue() + 
1065
                    ":D1SYSMETA:" + localId + ":");
1066
            //logCrud.info("getSystemMetadata localId: " + localId + " guid:" + guid.getValue());
1059 1067
            return sysmeta;
1060 1068
            
1061 1069
        } catch (McdbDocNotFoundException e) {
......
1319 1327
    /**
1320 1328
     * insert a systemMetadata doc
1321 1329
     */
1322
    private void insertSystemMetadata(SystemMetadata sysmeta, SessionData sessionData) 
1330
    private String insertSystemMetadata(SystemMetadata sysmeta, SessionData sessionData) 
1323 1331
        throws ServiceFailure 
1324 1332
    {
1325 1333
        logMetacat.debug("Starting to insert SystemMetadata...");
......
1338 1346
        //link it to the data or metadata document
1339 1347
        IdentifierManager.getInstance().createSystemMetadataMapping(
1340 1348
                sysmeta.getIdentifier().getValue(), sysMetaGuid.getValue());
1349
        return localId;
1341 1350
    }
1342 1351
    
1343 1352
    /**

Also available in: Unified diff