1
0
mirror of https://github.com/comatory/fb2iCal synced 2025-06-05 22:09:25 +02:00

add logger and daily rotating log files

This commit is contained in:
Ondrej Synacek
2019-10-24 10:21:41 +02:00
parent 610ad61097
commit 06469d3236
11 changed files with 317 additions and 35 deletions

View File

@ -35,8 +35,12 @@ const createLocationData = (streetText, areaText) => {
// NOTE: Fallback parser
// Attempt reading event data directly from DOM
const parseUsingDOM = (html, url) => {
console.info('Fallback parser used')
const parseUsingDOM = (html, url, { logger }) => {
logger.log({
message: 'Using fallback DOM parser',
level: 'info',
service: 'parser',
})
const $ = cheerio.load(html)
const title = $('title').text()