WoW API: LoggingChat

From AddOn Studio
Jump to navigation Jump to search

WoW API < LoggingChat


Toggles the chat logging and returns the current state.

isLogging = LoggingChat([newState])


Parameters[edit]

Arguments[edit]

newState
Boolean - toggles chat logging

Returns[edit]

isLogging
Boolean - current state of logging


Example[edit]

if (LoggingChat()) then
  DEFAULT_CHAT_FRAME:AddMessage("Chat is already being logged");
else
  DEFAULT_CHAT_FRAME:AddMessage("Chat is not being logged - starting it!");  
  LoggingChat(1);
  DEFAULT_CHAT_FRAME:AddMessage("Chat is now being logged to Logs\\WOWChatLog.txt");
end