Appenders do the actual work of writing log messages to
some target. To use an appender in a logger, you must
register it to a given logger. Use flog.appender
to both access and set appenders. The ROOT logger by default uses appender.console.
appender.console is a function that writes to the
console. No additional arguments are necessary when
registering the appender via flog.appender.
appender.file writes to a file, so you must pass
an additional file argument to the function. To change
the file name, just call
flog.appender(appender.file(file)) again with a
new file name.
To use your own appender create a function that takes a
single argument, which represents the log message. You
need to pass a function reference to
flog.appender.