Add config callback to change the log file when the config log_dir/log_name change.
Merge pull request #2167 from matham/logger

Add config callback to change the log file when the config log_dir/log_name change.