No stack trace in production log

Can you help me to understand where do I put Logger.error(error) to log errors? I don’t understand it from the original post.