Raised This Month: $32 Target: $400
 8% 

Prevent certain log lines from being written to file but still be sent to logaddress


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
randunel
Member
Join Date: Mar 2007
Old 04-11-2019 , 14:58   Prevent certain log lines from being written to file but still be sent to logaddress
Reply With Quote #1

When writing verbose stats plugins, is there a way to send log lines to logaddress and not write them to log files?
randunel is offline
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 04-11-2019 , 17:02   Re: Prevent certain log lines from being written to file but still be sent to logaddr
Reply With Quote #2

You can use Sockets. https://forums.alliedmods.net/showthread.php?t=67640
__________________
Steam - https://steamcommunity.com/id/sniperheroofficialu/
Discord - SniperHero#8545
cristian20042 is offline
randunel
Member
Join Date: Mar 2007
Old 04-12-2019 , 15:18   Re: Prevent certain log lines from being written to file but still be sent to logaddr
Reply With Quote #3

That is a decent workaround, thank you.

I strive to reduce the (external) dependencies as much as possible, and this would be a rather large one to add in. Besides, quite a bit of configuration would be required to hook up to logaddress. It's doable.

I'm still looking for alternatives, if any. Should nothing else work, this would be it.
randunel is offline
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Old 04-12-2019 , 16:58   Re: Prevent certain log lines from being written to file but still be sent to logaddr
Reply With Quote #4

Hmm, I found another method which is https://forums.alliedmods.net/showthread.php?t=152216. I don't know if there is any other method, but feel free everyone to tell me if there is.

EDIT: I found another method, that could help you: https://forums.alliedmods.net/showthread.php?t=223024
__________________
Steam - https://steamcommunity.com/id/sniperheroofficialu/
Discord - SniperHero#8545

Last edited by cristian20042; 04-13-2019 at 04:48.
cristian20042 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-13-2019 , 09:57   Re: Prevent certain log lines from being written to file but still be sent to logaddr
Reply With Quote #5

sv_logfile 0
psychonic is offline
randunel
Member
Join Date: Mar 2007
Old 04-14-2019 , 05:30   Re: Prevent certain log lines from being written to file but still be sent to logaddr
Reply With Quote #6

Thank you both!

On
Quote:
sv_logfile 0
, that isn't feasible, I don't want to mess around with general server settings, I just want _my_ plugin to be silent (while all others may freely respect logging settings).

Given the frequency of outputs (e.g. every player_footstep and every weapon_fire are output to log), TCP is not feasible, either, so no websockets or curl. So far, either the `sockets` extension via UDP or explicitly documenting the plugin to warn in CAPSLOCK that it's extremely log verbose.

Edit: to clarify, I need lots of events in realtime to reproduce the gameplay in a webpage. Works, so far, but RIP logfiles.

Last edited by randunel; 04-14-2019 at 05:38.
randunel is offline
Reply


Thread Tools
Display Modes

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 23:39.


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