added log_to and log_level options