Shell Script How to write logs in a Separate File

This is a very common scenario to log the application messages into a separate file; Here, we will see a