improve logging
This commit is contained in:
parent
3874ece241
commit
48dafda06c
|
@ -245,6 +245,9 @@ class watchFolderService {
|
||||||
}
|
}
|
||||||
|
|
||||||
const event = this.clubSameCollectionEvents();
|
const event = this.clubSameCollectionEvents();
|
||||||
|
addLogLine(
|
||||||
|
`running event type:${event.type} collectionName:${event.collectionName} folderPath:${event.folderPath} , fileCount:${event.files?.length} pathsCount: ${event.paths?.length}`
|
||||||
|
);
|
||||||
const mappings = this.getWatchMappings();
|
const mappings = this.getWatchMappings();
|
||||||
const mapping = mappings.find(
|
const mapping = mappings.find(
|
||||||
(mapping) => mapping.folderPath === event.folderPath
|
(mapping) => mapping.folderPath === event.folderPath
|
||||||
|
@ -252,6 +255,9 @@ class watchFolderService {
|
||||||
if (!mapping) {
|
if (!mapping) {
|
||||||
throw Error('no Mapping found for event');
|
throw Error('no Mapping found for event');
|
||||||
}
|
}
|
||||||
|
addLogLine(
|
||||||
|
`mapping for event rootFolder: ${mapping.rootFolderName} folderPath: ${mapping.folderPath} uploadStrategy: ${mapping.uploadStrategy} syncedFilesCount: ${mapping.syncedFiles.length} ignoredFilesCount ${mapping.ignoredFiles.length}`
|
||||||
|
);
|
||||||
if (event.type === 'upload') {
|
if (event.type === 'upload') {
|
||||||
event.files = getValidFilesToUpload(event.files, mapping);
|
event.files = getValidFilesToUpload(event.files, mapping);
|
||||||
if (event.files.length === 0) {
|
if (event.files.length === 0) {
|
||||||
|
@ -260,9 +266,6 @@ class watchFolderService {
|
||||||
}
|
}
|
||||||
this.currentEvent = event;
|
this.currentEvent = event;
|
||||||
this.currentlySyncedMapping = mapping;
|
this.currentlySyncedMapping = mapping;
|
||||||
addLogLine(
|
|
||||||
`running event type:${event.type} collectionName:${event.collectionName} folderPath:${event.folderPath} , fileCount:${event.files?.length} pathsCount: ${event.paths?.length}`
|
|
||||||
);
|
|
||||||
|
|
||||||
if (event.type === 'upload') {
|
if (event.type === 'upload') {
|
||||||
this.processUploadEvent();
|
this.processUploadEvent();
|
||||||
|
|
Loading…
Reference in a new issue