Added flexibility to log creation.