LogRotateWin Wiki
Implementation of logrotate utility for Windows Platform
Status: Beta
Brought to you by:
kennethsalter
Welcome to the LogRotateWin Wiki!
The following pages have been created:
[LogRotate] - A page in a man style containing all information needed to configure and run logrotate.
Hi all (sorry for my english), I would like to know how to make a folder logs rotate every day, and compress the content (do not want to remove)
This is the configuration file content:
C:\Documents and Settings\synchrot\Desktop\BackupsLogsPrueba {
rotate 5
daily
prerotate
@echo off
echo This is a test
echo parameter pass %1
VER | TIME > TEMP.BAT
ECHO SET TIME=%%3>CURRENT.BAT
DEL TEMP.BAT
DEL CURRENT.BAT
ECHO It's %TIME% now
}
I Do not know how to test run, and if it is well configured.
Could you please help me?
Thanks.
For a test run, use logrotate -d configFile
That will give you debugging output about what logrotate would do if it ran. No files will be affected.
Last edit: Howard Spindel 2023-02-13
Here is my config file:
compress
nosmtpssl
smtpfrom howard@sci1.com
smtpport 25
smtpserver mail.sci1.com
ifempty
missingok
e:\FastvueSyslog\dhcp2.sci1.com\dhcp2.sci1.com.log
{
rotate 5
weekly
mail howard@sci1.com
}
Pretty simple. When I run logrotate, I get an error:
logrotate: Unknown directive e:\FastvueSyslog\dhcp2.sci1.com\dhcp2.sci1.com.log
What am I doing wrong?