Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
core(logging): adjust logging messages
Browse files Browse the repository at this point in the history
Change-Id: Iccfb83392dcbc2241d835d7da41cc3126c4c75ef
  • Loading branch information
andi34 committed Jan 22, 2022
1 parent bfe50b4 commit ade299c
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ const photoBooth = (function () {
.done(function (result) {
endTime = new Date().getTime();
totalTime = endTime - startTime;
photoboothTools.console.log('took ' + data.style, result);
photoboothTools.console.log('Took ' + data.style, result);
photoboothTools.console.logDev('Taking picture took ' + totalTime + 'ms');
if (config.ui.shutter_animation) {
api.shutter.stop();
Expand Down Expand Up @@ -665,7 +665,7 @@ const photoBooth = (function () {
}
takingPic = false;
remoteBuzzerClient.inProgress(false);
photoboothTools.console.logDev('Taking photo: ' + takingPic);
photoboothTools.console.logDev('Taking picture in progress: ' + takingPic);
if (config.dev.reload_on_error) {
loading.append($('<p>').text(photoboothTools.getTranslation('auto_reload')));
setTimeout(function () {
Expand Down Expand Up @@ -747,7 +747,7 @@ const photoBooth = (function () {

preloadImage.onload = function () {
$('body').attr('data-main-image', filename);
photoboothTools.console.log(config.foldersRoot.keying + '/' + filename);
photoboothTools.console.log('Chroma image: ' + config.foldersRoot.keying + '/' + filename);
const chromaimage = config.foldersRoot.keying + '/' + filename;

loader.hide();
Expand All @@ -759,9 +759,9 @@ const photoBooth = (function () {

takingPic = false;
remoteBuzzerClient.inProgress(false);
photoboothTools.console.logDev('Taking picture in progress: ' + takingPic);

api.resetTimeOut();
photoboothTools.console.logDev('Taking photo: ' + takingPic);
};

api.renderPic = function (filename, files) {
Expand Down Expand Up @@ -824,7 +824,7 @@ const photoBooth = (function () {
} else {
photoboothTools.console.log('Error while deleting ' + file);
if (data.error) {
photoboothTools.console.log(data.error);
photoboothTools.console.log('Error: ' + data.error);
}
setTimeout(function () {
photoboothTools.reloadPage();
Expand Down Expand Up @@ -872,11 +872,10 @@ const photoBooth = (function () {

takingPic = false;
remoteBuzzerClient.inProgress(false);
photoboothTools.console.logDev('Taking picture in progress: ' + takingPic);

api.resetTimeOut();

photoboothTools.console.logDev('Taking photo: ' + takingPic);

if (config.preview.mode === PreviewMode.GPHOTO.valueOf() && !config.preview.gphoto_bsm) {
api.startVideo(CameraDisplayMode.INIT);
}
Expand Down Expand Up @@ -1002,7 +1001,7 @@ const photoBooth = (function () {

api.printImage = function (imageSrc, cb) {
if (isPrinting) {
photoboothTools.console.log('Printing already: ' + isPrinting);
photoboothTools.console.log('Printing in progress: ' + isPrinting);
} else {
photoboothTools.modal.open('#print_mesg');
isPrinting = true;
Expand Down Expand Up @@ -1078,7 +1077,7 @@ const photoBooth = (function () {
},
success: (data) => {
if (data.error) {
photoboothTools.console.log('Error while deleting image');
photoboothTools.console.log('Error while deleting image!');
}
cb(data);
},
Expand All @@ -1100,7 +1099,7 @@ const photoBooth = (function () {
},
success: (data) => {
if (data.error) {
photoboothTools.console.log('Error while deleting image');
photoboothTools.console.log('Error while deleting image!');
}
},
error: (jqXHR, textStatus) => {
Expand Down Expand Up @@ -1134,7 +1133,7 @@ const photoBooth = (function () {
imgFilter = $(this).attr('id');
const result = {file: resultPage.attr('data-img')};

photoboothTools.console.logDev('Applying filter', imgFilter, result);
photoboothTools.console.logDev('Applying filter: ' + imgFilter + ' ' + result);

api.processPic(imgFilter, result);

Expand Down Expand Up @@ -1309,7 +1308,7 @@ const photoBooth = (function () {
if (triggerPic[0] || triggerCollage[0]) {
if (config.picture.key && parseInt(config.picture.key, 10) === ev.keyCode) {
if (takingPic) {
photoboothTools.console.logDev('Taking photo already in progress!');
photoboothTools.console.logDev('Taking picture already in progress!');
} else {
$('.closeGallery').trigger('click');
if (config.collage.enabled && config.collage.only) {
Expand All @@ -1325,7 +1324,7 @@ const photoBooth = (function () {

if (config.collage.key && parseInt(config.collage.key, 10) === ev.keyCode) {
if (takingPic) {
photoboothTools.console.logDev('Taking photo already in progress!');
photoboothTools.console.logDev('Taking picture already in progress!');
} else {
$('.closeGallery').trigger('click');
if (config.collage.enabled) {
Expand Down

0 comments on commit ade299c

Please sign in to comment.