Skip to content

Commit

Permalink
Stop logging DICOM (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiao authored Oct 18, 2021
1 parent 385c53f commit c4a7442
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class CFindServiceSCP extends CFindService {
private DicomNetwork service = null;
private LuceneQueryACLManager luke = null;

private boolean superSpeed = false;
private boolean loggingDICOM = false;


public CFindServiceSCP(String[] multiSop, Executor e) {
Expand Down Expand Up @@ -155,7 +155,7 @@ protected synchronized DimseRSP doCFind(Association as, int pcid,
queryParams += ElementDictionary.getDictionary().nameOf(element.tag()) + " - " + element.getValueAsString(new SpecificCharacterSet("UTF-8"), 0) + " ";
}
}
if (!superSpeed)
if (loggingDICOM)
{
LogLine ll = new LogLine("cfind", getDateTime(), as.getCallingAET(),
as.toString() + " -- " + add, queryParams);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
import org.dcm4che2.data.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.transform.TransformerConfigurationException;
import org.dcm4che2.data.DicomElement;
import org.dcm4che2.data.DicomObject;
Expand All @@ -47,8 +46,6 @@
import pt.ua.dicoogle.server.DicomNetwork;
import pt.ua.dicoogle.server.SearchDicomResult;
import pt.ua.dicoogle.core.ServerSettings;
import pt.ua.dicoogle.rGUI.server.controllers.Logs;
import pt.ua.dicoogle.server.web.DicoogleWeb;

/**
*
Expand All @@ -60,6 +57,8 @@ public class CMoveServiceSCP extends CMoveService {

private DicomNetwork service = null;
private LuceneQueryACLManager luke;
private boolean loggingDICOM = false;


public CMoveServiceSCP(String[] sopClasses, Executor executor, LuceneQueryACLManager luke) {
super(sopClasses, executor);
Expand Down Expand Up @@ -217,17 +216,18 @@ protected DimseRSP doCMove(Association as, int pcid, DicomObject cmd,
}
}

if (loggingDICOM) {
LogLine ll = new LogLine("cmove", LogLine.getDateTime(), destination,
"Files: " + files.size() + " -- (" + hostDest + ":" + portAddr + ")", "studyUID=" + data.getString(Tag.StudyInstanceUID));
LogDICOM.getInstance().addLine(ll);

LogLine ll = new LogLine("cmove", LogLine.getDateTime(), destination,
"Files: " + files.size() + " -- (" + hostDest + ":" + portAddr + ")","studyUID="+data.getString(Tag.StudyInstanceUID));
LogDICOM.getInstance().addLine(ll);

synchronized (LogDICOM.getInstance()) {
try {
LogXML l = new LogXML();
l.printXML();
} catch (TransformerConfigurationException ex) {
LoggerFactory.getLogger(CMoveServiceSCP.class).error(ex.getMessage(), ex);
synchronized (LogDICOM.getInstance()) {
try {
LogXML l = new LogXML();
l.printXML();
} catch (TransformerConfigurationException ex) {
LoggerFactory.getLogger(CMoveServiceSCP.class).error(ex.getMessage(), ex);
}
}
}

Expand Down

0 comments on commit c4a7442

Please sign in to comment.