added ability for optional argument in the log~ object and updated the doc accordingly.