Log file disable / untick script?

Hello,

Does anyone have a script, maybe triggered by a playlist item which will uncheck / check Logging to Log File?

I have two separate Logging instances which both write to the same text file.

Instance 1: Logs information about the current item being played
Instance 2: Logs information about subsequent (next) items in the playlist

I want to be able stop instance 2 from running at certain times in the playlist, is this possible please?

Thanks
adman

Hope the details are clear… Any ideas?