@database Logger @wordwrap @node MAIN "(C)Logger by Andrew Aldridge" @{B} Logger and Clogger @{UB} written in Arexx by Andrew Aldridge What are Logger and Clogger? @{"*" link LOG_DESC} Where do I put them? @{"*" link LOG_INST} How do I use them? @{"*" link LOG_USE} Author/License @{"©" link LOG_AUT} @endnode @node LOG_DESC "Logger and Clogger" Logger and Clogger basically do the same thing, they read a configuration file containing the locations of all your logfiles, and how many lines of each file you wish to keep, the config file is in the format.... # anything starting with a '#' is ignored, as are blank lines # location of logfile to trim number of lines to keep Work:mail/Spot.log 50 Work:mail/TrapDoor.log 50 Work:AmiTCP/db/newshistory 600 And:so/on The difference between the two scripts is as follows.... Logger is the fastest of the two scripts, because it uses an external command call Tail to trim the log files. Clogger does the logfile trimming using Arexx. Obviously Logger is the more useful script, Clogger was just an experiment, the speed difference is quite extraordinary, so I recommend that you get hold of the command Tail, and put it in your C: directory, it can be found on Aminet... util/cli/Tail.lzh (C)Logger also requires the stunning RexxReqTools by Rafael D'Halleweyn. @endnode @node LOG_INST "Installing" Copy the script you wish to use to somewhere in your path, I use the S: directory, the configfile will be kept in S:Logger.config, you may change this if you wish, by editing this line in the script... configfile = 's:logger.config' to the location of your choice. Once installed make sure that the 's' protection bit on the script is set... Protect s:logger +s should do the trick. @endnode @node LOG_USE "Using Logger and Clogger" The CLI usage is as follows... Logger FORCE/S CONFIG/S LOGRESET/S or Clogger FORCE/S CONFIG/S LOGRESET/S (C)Logger will ask you if you want to delete each file, if you want it to trim files without checking first use the FORCE switch. The CONFIG switch will give you the opportunity to create a new Logger.config file before trimming the logs. (C)Logger will keep backups of the original files if you wish to restore these backups use the LOGRESET switch. @endnode @node LOG_AUT "And this is me..." Andy Aldridge | andy@aald.demon.co.uk 85 Studley Grange Road | 2:254/255.12@fidonet.org Hanwell LONDON W7 2LU UK Any bug reports criticisms or comments gratefully received, would anyone who improves on this script in any way be so kind as to send me a copy of the modified script I'm always keen to see just where I went wrong. This is my second Arexx project, and as such I know that it isn't perfect, so any Arexx gurus out there who want to tell me what I've done wrong please, please do. My only other release so far is.... GUIF1.3 which is an Arexx GUI front end to AmiTCP's Finger command... go on...give it a try, it's on Aminet (hopefully)... comm/tcp/guif1_3.lha @{B} Legal Guff @{UB} (C)Logger is freely distributable but remains the copyright of Andrew Aldridge, it may be distributed on disk, CDROM or by any other method so long as the charge is no more than the cost of the materials, the post and the packaging. All necessary steps have been taken to ensure that (C)Logger is in full working order, however I cannot be held responsible should this script in any way damage your computer or your sanity. (C)Logger ©1995 Andy Aldridge @endnode