Skip to content

Commit bb4a808

Browse files
committed
Fix log bug causing incorrect timestamps
1 parent 4cfd795 commit bb4a808

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

zebedee-cms/src/main/java/com/github/onsdigital/zebedee/model/approval/tasks/CollectionPdfGenerator.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,14 @@ private boolean generatePDFForContent(Collection collection, ContentWriter write
141141
if (language == null) {
142142
throw new InvalidParameterException("Language can't be null");
143143
}
144-
CMSLogEvent e = info().data("uri", uri).data("lang", language.toString()).collectionID(collection);
145144
try {
146145
pdfService.generatePdf(writer, uri, language);
147-
e.log("content PDF generated successfully");
146+
info().data("uri", uri).data("lang", language.toString()).collectionID(collection)
147+
.log("content PDF generated successfully");
148148
return true;
149149
} catch (Exception ex) {
150-
e.exception(ex).log("error generating PDF content");
150+
info().data("uri", uri).data("lang", language.toString()).collectionID(collection)
151+
.exception(ex).log("error generating PDF content");
151152
throw new InternalServerError("error generating PDF content", ex);
152153
}
153154
}

0 commit comments

Comments
 (0)