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

Plugin that automaatically delete old logs?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 10-19-2016 , 16:23   Plugin that automaatically delete old logs?
Reply With Quote #1

Does anybody knows a plugin that automaatically delete old logs? I am talking about sourcemod-logs and the normal csgo-logs.

Thanks for any help.
fragnichtnach is offline
Husker
Member
Join Date: Feb 2016
Location: Earth
Old 10-19-2016 , 16:34   Re: Plugin that automaatically delete old logs?
Reply With Quote #2

No need for such a plugin, just make a script that deletes old log files (theres plenty of examples of such scripts in the interwebz).

Last edited by Husker; 10-19-2016 at 16:34.
Husker is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 10-19-2016 , 19:55   Re: Plugin that automaatically delete old logs?
Reply With Quote #3

This is more of a plugin request so it should be moved there, but this should work


It automatically deletes files that are older than a week. If you want to increment the time change this line. It's in weeks
Code:
#define WEEKS_TO_DELETE 1
As usual, SourceMod 1.7+
Spoiler
Attached Files
File Type: sp Get Plugin or Get Source (hl_logcleaner.sp - 240 views - 2.2 KB)

Last edited by headline; 10-19-2016 at 20:05.
headline is offline
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 10-19-2016 , 22:49   Re: Plugin that automaatically delete old logs?
Reply With Quote #4

I usually just add this to my crontab:

Code:
0 5 * * * /usr/bin/find / -name errors*.log -exec rm {} + && /usr/bin/find / -name L20*.log -exec rm {} +
__________________

GZS Servers
Puppetmaster 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 11:16.


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