Skip to content
Snippets Groups Projects
Commit 627d182a authored by Lars Brodin Østby's avatar Lars Brodin Østby
Browse files

Merge branch 'fix/pdf' into 'dev'

Added logger and changed typo

See merge request !137
parents 04212d54 4b83e3e2
No related branches found
No related tags found
2 merge requests!165Weekly merge to Master,!137Added logger and changed typo
Pipeline #79872 passed
......@@ -98,7 +98,7 @@ public class AlbumService {
Album album = getAlbumById(albumId)
.orElseThrow(IllegalArgumentException::new);
String destinationFile = String.format("%s/downloads/%s.pdf",
String destinationFile = String.format("%s/Downloads/%s.pdf",
System.getProperty("user.home"),
album.getTitle());
......
......@@ -10,6 +10,8 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
......@@ -33,6 +35,9 @@ public class PdfDocument implements AlbumDocument {
private String defaultTitle = "Album";
private static Logger logger = LoggerFactory.getLogger(PdfDocument.class);
/**
* Standard fonts.
*/
......@@ -59,7 +64,7 @@ public class PdfDocument implements AlbumDocument {
try {
generatePdfDocument();
} catch (IOException | DocumentException e) {
e.printStackTrace();
logger.error("[x] An error occurred when trying to save pdf", e);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment