lib/appenders/file.js
function fileAppender(config, layout) {
  const appender = new FileAppender(config, layout);

  // push file to the stack of open handlers
  appenderList.push(appender);

  return appender.write;
}
function fileAppender(config, layout) {
  const appender = new FileAppender(config, layout);

  // push file to the stack of open handlers
  appenderList.push(appender);

  return appender.write;
}
function fileAppender ( config , layout ) { const appender = new FileAppender ( config , layout ) ; // push file to the stack of open handlers appenderList . push ( appender ) ; return appender . write ; }
File Appender writing the logs to a text file. Supports rolling of logs by size.

@param file file log messages will be written to
@param layout a function that takes a logevent and returns a string *   (defaults to basicLayout).
@param logSize - the maximum size (in bytes) for a log file, *   if not provided then logs won't be rotated.
@param numBackups - the number of log files to keep after logSize *   has been reached (default 5)
@param compress - flag that controls log file compression
@param timezoneOffset - optional timezone offset in minutes (default system local)
@param stripAnsi - flag that controls if ansi should be strip (default true)
File Appender writing the logs to a text file . Supports rolling of logs by size .