Raised This Month: $51 Target: $400
 12% 

Actions through the admin menu are invisible to logging and HLSW


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Maliwolf
Member
Join Date: Jul 2015
Old 02-28-2017 , 05:01   Actions through the admin menu are invisible to logging and HLSW
Reply With Quote #1

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?
Maliwolf is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 02-28-2017 , 11:11   Re: Actions through the admin menu are invisible to logging and HLSW
Reply With Quote #2

The .sp files are there, you can add a LogToFile to the slap function and recompile the plugin.
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS

Last edited by OSWO; 02-28-2017 at 11:11.
OSWO is offline
psychonic

BAFFLED
Join Date: May 2008
Old 02-28-2017 , 16:15   Re: Actions through the admin menu are invisible to logging and HLSW
Reply With Quote #3

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.
psychonic is offline
Maliwolf
Member
Join Date: Jul 2015
Old 03-01-2017 , 01:19   Re: Actions through the admin menu are invisible to logging and HLSW
Reply With Quote #4

Quote:
Originally Posted by OSWO View Post
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 View Post
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.
Maliwolf is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-01-2017 , 14:00   Re: Actions through the admin menu are invisible to logging and HLSW
Reply With Quote #5

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.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:29.


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