Project

General

Profile

« Previous | Next » 

Revision 6542

add User-Agent logging to support D1 requirements

View differences:

ReplicationService.java
655 655
				logReplication.info("ReplicationService.handleForceReplicateRequest - document " + docid + " added to DB with "
656 656
						+ "action " + dbaction);
657 657
				
658
				EventLog.getInstance().log(request.getRemoteAddr(), REPLICATIONUSER, docid, dbaction);
658
				EventLog.getInstance().log(request.getRemoteAddr(), request.getHeader("User-Agent"), REPLICATIONUSER, docid, dbaction);
659 659
			}
660 660
		} catch (SQLException sqle) {
661 661
			logMetacat.error("ReplicationService.handleForceReplicateRequest - " + ReplicationService.METACAT_REPL_ERROR_MSG);                         
......
711 711
			logReplication.info("ReplicationService.handleForceReplicateDeleteRequest - Force replication delete docid: " + docid);
712 712
			DocumentImpl.delete(docid, null, null, server);
713 713
			logReplication.info("ReplicationService.handleForceReplicateDeleteRequest - document " + docid + " was successfully deleted ");
714
			EventLog.getInstance().log(request.getRemoteAddr(), REPLICATIONUSER, docid,
714
			EventLog.getInstance().log(request.getRemoteAddr(), request.getHeader("User-Agent"), REPLICATIONUSER, docid,
715 715
					"delete");
716 716
			logReplication.info("ReplicationService.handleForceReplicateDeleteRequest - document " + docid + " was successfully deleted ");
717 717
		} catch (McdbDocNotFoundException e) {
......
867 867

  
868 868
				logReplication.info("ReplicationService.handleForceReplicateDataFileRequest - datafile " + docid + " added to DB with "
869 869
						+ "action " + dbaction);
870
				EventLog.getInstance().log(request.getRemoteAddr(), REPLICATIONUSER,
870
				EventLog.getInstance().log(request.getRemoteAddr(), request.getHeader("User-Agent"), REPLICATIONUSER,
871 871
						docid, dbaction);
872 872
			}
873 873

  
......
1064 1064
			}
1065 1065
      
1066 1066
			logReplication.info("ReplicationService.handleForceReplicateSystemMetadataRequest - processed guid: " + guid);
1067
			EventLog.getInstance().log(request.getRemoteAddr(), REPLICATIONUSER, guid, "systemMetadata");
1067
			EventLog.getInstance().log(request.getRemoteAddr(), request.getHeader("User-Agent"), REPLICATIONUSER, guid, "systemMetadata");
1068 1068

  
1069 1069
		} catch (Exception e) {
1070 1070
			logMetacat.error("ReplicationService.handleForceReplicateRequest - " + ReplicationService.METACAT_REPL_ERROR_MSG, e);                         

Also available in: Unified diff