Disabling logging

You can disable all logging activities in the current request by calling

activity()->disableLogging();

If you want to enable logging again call activity()->enableLogging().