Hey, I was wondering if there was some way to log things said in /say or in /party chat. I’ve attempted to do said thing in the configs, but I’m not sure I am even close to doing it right. Do you guys have any ideas on how I can get the core to save whatever messages are sent in-game to a logfile?
I would create a PlayerScript and override the OnChat hooks: https://github.com/TrinityCore/TrinityCore/blob/ab90f744866d761a302380e12ed7b0dee23697f0/src/server/game/Scripting/ScriptMgr.cpp#L1251
Okay, and how would I go by doing that?
What’s wrong with the logs you already can configure in the config file ?
Otherwise have a look to the scriptsworldchat_log.cpp file how things works there.
Nothing’s wrong with them, I just want to know how to configure them. I’ll take a look at that file, though.
Not sure if this is the right place or not but going to ask anyway. I am having trouble getting certain things to go into a log file. Example in the config I have the appenders and loggers the same. GM, DBErrors.log those work fine. I cannot seem to get things like Char and Chat or even Warden to work though. I have them all set the same so they should all work but there is nothing. Any suggestions?
You have them set to debug?
Chat won’t log unless it’s set to debug. I also log the chat to a DB. makes searches a bit easier using a web console, rather than grepping thru files, I also filter by chat.log.guild, whisper, bg, trade, channel, etc, etc…
Not sure if it’s taxing on the DB, even though I haven’t noticed a difference in performance.
No I don’t have them set to debug, I had them set to Info, will try debug but would rather have them in a file than the DB myself.