Eggdrop Tcl Archive

Home | Contact | Forum | Submit a Script

View All Information: Script Id191

Script Name: LogZipper Version: 2.0 Author: Baerchen Script Date: 12/06/2001 Category: Not specified Downloads: 13 File Name: LogZipper.zip Short Description: Zips .yesterday's logfile, puts date [dd/mmm/yyyy] in the filename and deletes the log. Keeps zipped logs for a definable period. Can also send zipped logs via e-mail.

Extended Description File

.
 _                ______
| |    ___   __ _|__  (_)_ __  _ __   ___ _ __
| |   / _ \ / _` | / /| | '_ \| '_ \ / _ \ '__|
| |__| (_) | (_| |/ /_| | |_) | |_) |  __/ |
|_____\___/ \__, /____|_| .__/| .__/ \___|_|
            |___/       |_|   |_|           
                      2.0 by Baerchen, May 2001
                             for eggdrop 1.4.x+
                      baerchen@germany-chat.net

DESCRIPTION
**********************************************************************

LogZipper takes care of all your log files. It might be useful if you
have a disc-quota or if your bot logs a lot of channels.

LogZipper zips all ".yesterday" (or ".${logfile-suffix}") logfiles
it can find in a given directory, adds yesterday's date to the
filename and deletes the original log. The zipped log can then
be mailed to various recipients (as an attachment, of course ;-))
If you decide that keeping logs for more than x days is not
necessary, LogZipper compares their last modification dates (mtime)
to the current date and deletes all zips which age _exceed_ x days.

CONFIGURATION
**********************************************************************

set lz(logloc) "logs/"

	lz(logloc) is the relative path of the directory where you
	keep the logfiles. Leave trailing / as is.

set lz(duration) 2

	lz(duration) is the amount of days you want to keep the
	zipped logs. Every day, the logs which age exceeds
	lz(duration) days, will be deleted. Set to 0 in order
	to never delete any log.

set lz(sendlogs) 0

	lz(sendlogs) determines whether you want to have the bot
	send any of the zipped logs to someone.
	0 = don't, 1 = yes, please

set lz_recipient(1) "user@mail log1.log #channel1.log #channel2.log"

	Here's the difficult part of this script. Logzipper
	needs to know what user shall receive which logs.
	
	Therefore, within the quotes of the variable, you type
	the email adress of the receiver in the first position.
	here: user@mail
	In the second, third, fourth, nth position, you assign
	_all_ logs the user shall receive - just use the same
	filenames as you have defined in the bot config file.
	That's the first part.
	
	Now, you might want to send logs to more than one user.
	Notice the "1" right after lz_recipients. For the next
	person to receive the same or other logs, copy the whole
	line and replace the 1 by a 2, e.g.:
	
	set lz_recipient(2) "user2@anothermail log1.log log4.log"

	Repeat this until all recipients are determined.

Have fun

Latest News

27 Dec 2018 Eggdrop v1.8.4 Stable Release 22 Dec 2018 Eggdrop v1.8.4 Release Candidate 3 15 Dec 2018 Eggdrop v1.8.4 Release Candidate 2 12 Dec 2018 Eggdrop v1.8.4 Release Candidate 1 04 Feb 2018 Eggdrop v1.8.3 Stable Release 13 Jan 2018 Eggdrop v1.8.3 Release Candidate 2

Resources

Eggdrop Community Forum Download Eggdrop Eggdrop Set-up Using your Eggdrop Enhancing Eggdrop Eggdrop Tcl Commands Eggdrop 1.8.3 Documents Eggdrop Config File Unix Shell Commands
Donate Help TclArchive.org with server costs. By donating, you help keep these scripts available to everyone. PayPal

© 2015 - 2022,  Greenwood Web Design