use winston logger in app

This commit is contained in:
Stefan Forstenlechner 2022-04-17 15:54:35 +02:00
parent 76632cea0b
commit 0b910e1ac5
1 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import { walk } from "./fsExtension";
import { initThumbnailsAsync } from "./thumbnails"; import { initThumbnailsAsync } from "./thumbnails";
import { publicPath } from "./paths"; import { publicPath } from "./paths";
import { getImages } from "./controller/images"; import { getImages } from "./controller/images";
import { expressLogger } from "./logging"; import { consoleLogger, expressLogger } from "./logging";
const app = express(); const app = express();
@ -43,10 +43,9 @@ app.get("*", (req, res) => {
}); });
app.listen(PORT, () => { app.listen(PORT, () => {
/* eslint-disable no-console */ consoleLogger.info(`Start processing thumbnails async`);
console.log(`Start processing thumbnails async`);
initThumbnailsAsync(""); initThumbnailsAsync("");
// eslint-disable-next-line no-console
return console.log(`Express is listening at http://localhost:${PORT}`); return console.log(`Express is listening at http://localhost:${PORT}`);
/* eslint-enable no-console */
}); });