UNPKG

kasa-smart-hub

Version:

Virtual Smart Hub for TP-Link Kasa Smart Home

13 lines (11 loc) 342 B
import fs from 'fs'; export default (config) => (...args) => { const log = [ `[${new Date().toISOString()}]`, `${args.length === 1 ? '' : ` [${args[0].toUpperCase()}]`}: `, `${args[args.length - 1]}` ].join(''); fs.appendFileSync(config.logFile, `${log}\n`); // eslint-disable-next-line no-console console.log(log); };