![]() |
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Gets or sets whether logging combat to Logs\WoWCombatLog.txt is enabled.
isLogging = LoggingCombat([newState])
Parameters
Arguments
- newState
- boolean - Toggles combat logging
Returns
- isLogging
- nil - You are not logging
- 1 - You are logging
Example
if (LoggingCombat()) then
DEFAULT_CHAT_FRAME:AddMessage("Combat is already being logged";
else
DEFAULT_CHAT_FRAME:AddMessage("Combat is not being logged - starting it!");
LoggingCombat(1);
end
Example #2
Create a new macro and paste the following (one-line)
/script local a=LoggingCombat(LoggingCombat()==nil); UIErrorsFrame:AddMessage("CombatLogging is now "..tostring(a and "ON" or "OFF"),1,0,0);
Drag the macro-button to an action bar or key bind it and you have a one-click/keypress toggle.
Details
- If no parameter is passed in, LoggingCombat only returns the current state.
