added some logging

This commit is contained in:
zadam 2020-04-08 11:07:38 +02:00
parent 1175a8ee49
commit 6c188982b3
3 changed files with 7 additions and 1 deletions

View File

@ -13,7 +13,7 @@ const TPL = `
.note-detail-readonly-text h6 { font-size: 1.1em; } .note-detail-readonly-text h6 { font-size: 1.1em; }
.note-detail-readonly-text { .note-detail-readonly-text {
overflow: auto;y overflow: auto;
height: 100%; height: 100%;
padding: 10px; padding: 10px;
font-family: var(--detail-text-font-family); font-family: var(--detail-text-font-family);

View File

@ -67,6 +67,8 @@ async function addClipping(req) {
async function createNote(req) { async function createNote(req) {
const {title, content, pageUrl, images, clipType} = req.body; const {title, content, pageUrl, images, clipType} = req.body;
log.info(`Creating clipped note from ${pageUrl}`);
const clipperInbox = await getClipperInboxNote(); const clipperInbox = await getClipperInboxNote();
const {note} = await noteService.createNewNote({ const {note} = await noteService.createNewNote({

View File

@ -51,6 +51,8 @@ function getImageMimeFromExtension(ext) {
} }
async function updateImage(noteId, uploadBuffer, originalName) { async function updateImage(noteId, uploadBuffer, originalName) {
log.info(`Updating image ${noteId}: ${originalName}`);
const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, true); const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, true);
const note = await repository.getNote(noteId); const note = await repository.getNote(noteId);
@ -67,6 +69,8 @@ async function updateImage(noteId, uploadBuffer, originalName) {
} }
async function saveImage(parentNoteId, uploadBuffer, originalName, shrinkImageSwitch) { async function saveImage(parentNoteId, uploadBuffer, originalName, shrinkImageSwitch) {
log.info(`Saving image ${originalName}`);
const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, shrinkImageSwitch); const {buffer, imageFormat} = await processImage(uploadBuffer, originalName, shrinkImageSwitch);
const fileName = sanitizeFilename(originalName); const fileName = sanitizeFilename(originalName);