DEV Community

Discussion on: Logging! How do you decide on your app log levels and outputs?

Collapse
 
eldlabs profile image
Eldlabs

I am not sure if there is any silver bullet for your questions but, I will give you my view on it :)

  1. Consider what is most important from your perspective and what value you want from your logs, don't log blindly and everything. You will probably just get a huge pile of information that will make your life harder. So try to set up an strategy and adjust it if/when needed.

  2. Try to explain what you tried to do, and pass information about failure.

  3. Error - Use whenever application run it to unexpected error. Info - Use when service starts or ends (terminates normally). Debug - As it says during debugging. Should only consist of one or two lines of information.