AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Actions through the admin menu are invisible to logging and HLSW (https://forums.alliedmods.net/showthread.php?t=294485)

Maliwolf 02-28-2017 05:01

Actions through the admin menu are invisible to logging and HLSW
 
I love having logs on everything that happens on the server as it can help solve many issues. One thing I have been unable to do is figure out a way to log actions done though the admin menu, basic examples being the default slap and slay commands. Not even HLSW can see those commands which could allow for an admin slapping a player 50 times without me being able to ever see it happened. Even without that worry, I'd still like to be able to log and see all those actions. Would any one have ideas on this matter?

OSWO 02-28-2017 11:11

Re: Actions through the admin menu are invisible to logging and HLSW
 
The .sp files are there, you can add a LogToFile to the slap function and recompile the plugin.

psychonic 02-28-2017 16:15

Re: Actions through the admin menu are invisible to logging and HLSW
 
All of the actions mentioned get logged to the SourceMod log file by default (in sourcemod/logs/).

If you want them to log to the game log instead (and thus available in a log stream like you can capture with HLSW), there is an option in SourceMod's core.cfg for that.

Maliwolf 03-01-2017 01:19

Re: Actions through the admin menu are invisible to logging and HLSW
 
Quote:

Originally Posted by OSWO (Post 2499400)
The .sp files are there, you can add a LogToFile to the slap function and recompile the plugin.

Would be quite time consuming to add that to every plugin and recompile it. I'm able to capture sm_slap when using a CommandListener along with any other command that is run through chat (! /) or typed in console. My issue is that the menu used in sm_admin seems allow any command to bypass a CommandListener which makes it harder to log everything.

Quote:

Originally Posted by psychonic (Post 2499538)
All of the actions mentioned get logged to the SourceMod log file by default (in sourcemod/logs/).

If you want them to log to the game log instead (and thus available in a log stream like you can capture with HLSW), there is an option in SourceMod's core.cfg for that.

I Guess it does log them, as long as its a plugin that has "LogAction" written into it which seems to not include most of my plugins, but this isn't my preferred way to have these logged.I have a plugin that logs each admin command to a file with the admins name and steamid which is accomplished using a CommandListener, but the sm_admin menu is bypassing that. Is there a possible way I can capture all commands used in the sm_admin menu so that I can have everything neatly logged?

In the core.cfg I did change "LogMode" "daily" to "game" and this does indeed allow the sourcemod log to get displayed in HLSW, but then i loss that log file and i have problems reading the tf/logs because filezilla always says the latest log is being used by another process and wont transfer it to me. Would it be possible to have both the sourcemod/log and display to hlsw?

Thanks for your responses.

DJ Tsunami 03-01-2017 14:00

Re: Actions through the admin menu are invisible to logging and HLSW
 
It sounds like you're assuming that the admin menu just executes the command, which then performs the action. However, the commands and the admin menu are simply two different ways to perform an action, so AddCommandListener will not work. Instead, plugins are supposed to use LogAction to log admin actions, and then you can use OnLogAction in your plugin to write any information to a separate file.

This also means that you don't have to edit your plugin every time you want to log a new action, it will automatically work with any plugin that uses LogAction.


All times are GMT -4. The time now is 21:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.