Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

TIP: Log archiving and log tailing

Highlighted
Jan Gunnar Helg
Senior Member

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:
--------------------------------------------
cd %SD_SERVERHOME%\log

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"
exit
------------------------------------------

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.
1 REPLY
George M. Meneg
Honored Contributor

Re: TIP: Log archiving and log tailing

Hello Jan,

Thank you very much for sharing this.
menes fhtagn
//Add this to "OnDomLoad" event