added optional parameters to logging decorator