Allow external logfile

Created parameter to constructor that accepts a logfile name or defaults
to stdout for all log messages from database object