Service Desk Practitioners Forum

TIP: Log archiving and log tailing

Jan Gunnar Helg
Honored Contributor.

TIP: Log archiving and log tailing

Hi all

After getting some nice ideas from older posts I've come up with a small script to archive the logserver.txt (or any other logs you got) without having to stop the services.

First create an empty txt file and name it blank.txt Put it in the same dir as the logserver.txt
Then make a bat file with the following code:

ECHO "Renaming Logserver File"

md %date:~-4,4%\%date:~-10,2%\%date:~-7,2%
copy logserver.txt %date:~-4,4%\%date:~-10,2%\%date:~-7,2%
copy blank.txt logserver.txt

Echo "Done"

Feel free to make any alterations you wish to it :)

I also threw in a small log tailer executable, nice for monitoring any type of text log.
George M. Meneg
Acclaimed Contributor.

Re: TIP: Log archiving and log tailing

Hello Jan,

Thank you very much for sharing this.
menes fhtagn