@@ -249,6 +249,9 @@ public class DownloadService implements ApplicationListener<ContextClosedEvent>
249
249
@ Value ("${download.csdm.email.template:}" )
250
250
protected String biocacheDownloadCSDMEmailTemplate ;
251
251
252
+ @ Value ("${download.log.enabled:true}" )
253
+ protected Boolean downloadLogEnabled = true ;
254
+
252
255
ConcurrentHashMap <String , ThreadPoolExecutor > userExecutors ;
253
256
254
257
@ PostConstruct
@@ -577,10 +580,12 @@ public void writeQueryToStream(DownloadDetailsDTO dd,
577
580
: webservicesRoot + "?" + originalParams ;
578
581
579
582
// log the stats to ala logger
580
- LogEventVO vo = new LogEventVO (1002 , requestParams .getReasonTypeId (), requestParams .getSourceTypeId (),
581
- requestParams .getEmail (), requestParams .getReason (), dd .getIpAddress (), dd .getUserAgent (), null , downloadStats .getUidStats (), sourceUrl );
583
+ if (downloadLogEnabled ) {
584
+ LogEventVO vo = new LogEventVO (1002 , requestParams .getReasonTypeId (), requestParams .getSourceTypeId (),
585
+ requestParams .getEmail (), requestParams .getReason (), dd .getIpAddress (), dd .getUserAgent (), null , downloadStats .getUidStats (), sourceUrl );
582
586
583
- loggerService .logEvent (vo );
587
+ loggerService .logEvent (vo );
588
+ }
584
589
}
585
590
} catch (RecordWriterException e ) {
586
591
logger .error (e .getMessage (), e );
0 commit comments