$logging
Enables logging when set to true. Can be set at runtime.
$logdir
Path to package log file directory
log_pipe()
Passes stdin to stdout, saving a copy to file ($1).
log_filename()
Returns log filename given its base name ($1).
log_rotate()
Rotates log file ($1), saving n ($2) old files.
$1 - Log file name
$2 - Integer number of log files to save.