1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-06 23:56:13 +02:00

Tools: Added syncDebugLog to help debugging sync operations

This commit is contained in:
Laurent Cozic
2021-10-15 12:24:22 +01:00
parent 0ccd8dee41
commit fb935dde18
8 changed files with 47 additions and 6 deletions

View File

@ -10,6 +10,7 @@ import Tag from './Tag';
const { sprintf } = require('sprintf-js');
import Resource from './Resource';
import syncDebugLog from '../services/synchronizer/syncDebugLog';
const { pregQuote, substrWithEllipsis } = require('../string-utils.js');
const { _ } = require('../locale');
const ArrayUtils = require('../ArrayUtils.js');
@ -664,6 +665,8 @@ export default class Note extends BaseItem {
// Trying to fix: https://github.com/laurent22/joplin/issues/3893
const oldNote = !isNew && o.id ? await Note.load(o.id) : null;
syncDebugLog.info('Save Note: P:', oldNote);
let beforeNoteJson = null;
if (oldNote && this.revisionService().isOldNote(o.id)) {
beforeNoteJson = JSON.stringify(oldNote);
@ -680,6 +683,8 @@ export default class Note extends BaseItem {
}
}
syncDebugLog.info('Save Note: N:', o);
const note = await super.save(o, options);
const changeSource = options && options.changeSource ? options.changeSource : null;