The issue is parsing the log to do outside things, aka notify on discord or via text message etc.
If you intend for the log to be readable for some purposes, I would recommend a randomized delay before the log gets written so it cant be utilized for instant notification of in game events.
Example from log:
<record>
<date>2022-01-17T19:48:50Z</date>
<millis>1642450010131</millis>
<sequence>18617</sequence>
<logger>D:\Bamboo1\xml-data\build-dir\WC-REL21114-CSTS\Source\game\scripting\DPUnit.cpp:212</logger>
<level>WARNING</level>
<class>WC-REL21114-CSTS.game.scripting</class>
<method>NQ::DP::Unit::execute</method>
<thread>21872</thread>
<message>Executing a Lua method in the wrong thread. method='setAxisCommandValue', inFlush=true, method is Flush compatible:false, method is Update compatible:true</message>
</record>
The above occurs whenever a method is done in flush that isnt allowed. If i was nefarious, i would do that intentionally and log parse for it for my nefarious notifications