[MNT- 24124] Adding node references in DownloadStorage and ZipDownloadExporter files. (#2880)

* [MNT-24124]: Adding nodeReferences in loggers

* [MNT-24124]: Adding nodeReferences in loggers

* [fix/MNT-24124] Adding-nodeReferences-inLogger

---------

Co-authored-by: Mohit Singh <mohit.singh4@globallogic.com>
Co-authored-by: mohit-singh4 <mohit.singh@contractors.hyland.com>
This commit is contained in:
mohit-singh4
2024-08-28 12:47:47 +05:30
committed by GitHub
parent f890e9f995
commit a568aeda17
2 changed files with 15 additions and 1 deletions

View File

@@ -157,9 +157,10 @@ public class DownloadStorage
if (log.isDebugEnabled())
{
String downloadNodeRefString = "Download-NodeRef=" + downloadNodeRef;
StringBuilder msg = new StringBuilder();
msg.append("Created Download. ")
.append("', Download-NodeRef=");
.append(downloadNodeRefString);
log.debug(msg.toString());
}
return downloadNodeRef;
@@ -221,6 +222,11 @@ public class DownloadStorage
Long total = (Long)properties.get(DownloadModel.PROP_TOTAL);
Long filesAdded = (Long)properties.get(DownloadModel.PROP_FILES_ADDED);
Long totalFiles = (Long)properties.get(DownloadModel.PROP_TOTAL_FILES);
if (log.isDebugEnabled())
{
log.debug("Status for Download-NodeRef: "+downloadNodeRef+": done: "+done+", total: "+total+", filesAdded: "+filesAdded+", totalFiles: "+totalFiles);
}
return new DownloadStatus(DownloadStatus.Status.valueOf((String)properties.get(DownloadModel.PROP_STATUS)),
done != null ? done.longValue() : 0l,
@@ -239,6 +245,10 @@ public class DownloadStorage
public void updateStatus(NodeRef nodeRef, DownloadStatus status)
{
if (log.isDebugEnabled())
{
log.debug("Updating status for Download-NodeRef: "+nodeRef+" to status: "+status.getStatus());
}
validateNode(nodeRef);
nodeService.setProperty(nodeRef, DownloadModel.PROP_STATUS, status.getStatus().toString());

View File

@@ -174,6 +174,10 @@ public class ZipDownloadExporter extends BaseExporter
try
{
if (log.isDebugEnabled())
{
log.debug("Archiving content for nodeRef: "+nodeRef+" with contentURL: "+contentData.getContentUrl());
}
// ALF-2016
ZipArchiveEntry zipEntry=new ZipArchiveEntry(getPath());
zipEntry.setTime(zipTimestampCreated.getTime());