Make log as constructor argument.