Set up log dir and file in compile time.