You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Tools: Added syncDebugLog to help debugging sync operations
This commit is contained in:
@@ -8,6 +8,7 @@ import BaseItem from './BaseItem';
|
||||
import Resource from './Resource';
|
||||
import { isRootSharedFolder } from '../services/share/reducer';
|
||||
import Logger from '../Logger';
|
||||
import syncDebugLog from '../services/synchronizer/syncDebugLog';
|
||||
const { substrWithEllipsis } = require('../string-utils.js');
|
||||
|
||||
const logger = Logger.create('models/Folder');
|
||||
@@ -651,6 +652,8 @@ export default class Folder extends BaseItem {
|
||||
if (o.title == Folder.conflictFolderTitle()) throw new Error(_('Notebooks cannot be named "%s", which is a reserved title.', o.title));
|
||||
}
|
||||
|
||||
syncDebugLog.info('Folder Save:', o);
|
||||
|
||||
return super.save(o, options).then((folder: FolderEntity) => {
|
||||
this.dispatch({
|
||||
type: 'FOLDER_UPDATE_ONE',
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user