Hello,

I am developing an application for a client. They have requested some logging information.

I am thinking about be able to log debug messages, information, and serious errors.

Is there a way I could automatically switch the ones I want to log? For example, if I just wanted to write information to the log file, or write debug and information, or just serious errors.

What is the best practice when creating and writing to log files?

Many thanks for any advice,