Tweak to post method function for logging