using winston logger

This commit is contained in:
orangecoding
2025-09-13 18:57:56 +02:00
parent e868cdce86
commit 21415dcff3
19 changed files with 230 additions and 49 deletions

View File

@@ -4,6 +4,7 @@ import * as listingStorage from './listingsStorage.js';
import { getDirName } from '../../utils.js';
import path from 'path';
import LowdashAdapter from './LowDashAdapter.js';
import logger from '../logger.js';
const file = path.join(getDirName(), '../', 'db/jobs.json');
const adapter = new JSONFileSync(file);
@@ -91,9 +92,7 @@ export const removeJobsByUserName = (userId) => {
.value();
db.write();
if (removedDemoJobs > 0) {
/* eslint-disable no-console */
console.log(`Removed ${removedDemoJobs} demo jobs`);
/* eslint-enable no-console */
logger.info(`Removed ${removedDemoJobs} demo jobs`);
}
};
export const getJobs = () => {