log4jcore-file-appender
v1.1.1
Published
Write to a file instead of the console from log4jcore
Downloads
4
Readme
log4jcore-file-appender
Append to a file instead of logging to the console in log4jcore
Quick start
const { logger, setLogFunctionProvider } = require('log4jcore')
const { createFileAppender } = require('../index')
const path = require('path')
const file = path.join(__dirname, 'log.txt')
setLogFunctionProvider(createFileAppender({ file }))
const log = logger('loggerName')
log.info('write this to a file')