Made log method generic