SetLogger method

Turns debug on or off.

 Visual Basic syntax
 C# syntax