How do you recoomend that I run it?
Fpr anyone else reading this, I stumbled on the solution. The opening brace on a section must be at the end of the line instead of the next line. I suggest that the parser be improved to handle this.
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?
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.
For a test run, use logrotate -d <configfile></configfile> That will give you debugging output about what logrotate would do if it ran. No files will be affected.
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?
Hi, The problem is still reproduced on the latest version. My logrotate config: compress C:\logs\*.log { weekly rotate 4 missingok dateext notifempty } Results: & 'C:\Program Files (x86)\Ken Salter\LogRotate\logrotate.exe' -d -f -v C:\logrotate.d logrotate: Debug option set to true logrotate: Verbose option set to true logrotate: Force option set to true logrotate: logrotate 0.0.0.18 - Copyright (C) 2012-2016 Ken Salter logrotate: Verbose option set to true logrotate: C:\logrotate.d Adding to config...
Hi, The problem is still reproduced on the latest version. My logrotate config: compress C:\logs\*.log { weekly rotate 4 missingok dateext notifempty } Results: & 'C:\Program Files (x86)\Ken Salter\LogRotate\logrotate.exe' -d -f -v C:\logrotate.d --state C:\logrotate.status logrotate: Debug option set to true logrotate: Verbose option set to true logrotate: Force option set to true logrotate: logrotate 0.0.0.18 - Copyright (C) 2012-2016 Ken Salter logrotate: Verbose option set to true logrotate:...
confirmed with v0.0.0.18
We have to manually create scheduling tasks for this to work, correct? Also, what is logrotate.exe.config file in the root of installation directory?
Getting error as above. Here is my logrotate.conf file. ................................................... C:\logs\test.log { daily rotate 10 } ................................................... Output of my command: .\logrotate.exe -f -v -d 'C:\Program Files (x86)\Ken Salter\LogRotate\Content\logrotate.conf' ........................ PS C:\Program Files (x86)\Ken Salter\LogRotate> .\logrotate.exe -f -v -d 'C:\Program Files (x86)\Ken Salter\LogRotate\Content\logrotate.conf' logrotate: Force option...
Tried same thing in cmd as admin and getting different error: C:\Program Files (x86)\Ken Salter\LogRotate>.\logrotate.exe -f -d -v 'C:\Program Files (x86)\Ken Salter\LogRotate\Content\logrotate.conf' logrotate: Force option set to true logrotate: Debug option set to true logrotate: Verbose option set to true logrotate: logrotate 0.0.0.18 - Copyright (C) 2012-2016 Ken Salter logrotate: Verbose option set to true logrotate: 'C:\Program Adding to config files to process logrotate: Files Adding to config...
After changing path in ogrotate.conf as below, the int32 error went off but still it is not rotating test file. ................... C:\logs path contains below files test.log testing.log ...................... C:\logs\test* { daily rotate 10 } .................................................... PS C:\Program Files (x86)\Ken Salter\LogRotate> .\logrotate.exe -f -v -d 'C:\Program Files (x86)\Ken Salter\LogRotate\Content\logrotate.conf' logrotate: Force option set to true logrotate: logrotate 0.0.0.18...
Getting error as above. Here is my logrotate.conf file. ................................................... C:\logs\test.log { daily rotate 10 } ................................................... Output of my command: .\logrotate.exe -f -v -d 'C:\Program Files (x86)\Ken Salter\LogRotate\Content\logrotate.conf' ........................ PS C:\Program Files (x86)\Ken Salter\LogRotate> .\logrotate.exe -f -v -d 'C:\Program Files (x86)\Ken Salter\LogRotate\Content\logrotate.conf' logrotate: Force option...
Executable is 32-bit, so it's looking in SysWOW64.
I have a Snort log file that has to remain open, while it takes and copies off 1M files for retrieval and analysis. The 1M (1MB) test file size is to ensure that I can keep logging continues and we don't lose any information or payload. One option is to create new file instances, while keeping the original instances. The file instances would be unique, with the extensions being generated, based on a (clock) second count. The new file creation second could be 0, all the way up to 86400, so could be...
When I run logrotate with -f (force rotation, for testing), I get ==> "Exception: Access to path c:\logrotate.status is denied. " Files cannot and should not be placed out to the c: root directory. It denies access. I had to set up some pathing, because I am using Snort for Windows, which places files in Snort directories, which was unsuccessful to place files there, so tried to place the test files in the users area, but was unsucessful. I need logrotatewin to read the log files from the c:\Snort\bin...
Hi, Thank you for this helpfull software. I have a problem about reaching out logs under C:/Windows/System32 from logrotate "C:\Windows\System32\myLog.log" { rotate 1 size 10M } Just get the following error when i used logrotate for above configuration logrotate: C:\Windows\system32\myLog.log could not be found
Ken: With 0.18 I'm getting the same as with with both pre and post with "net start/stop service_name", ditto same behavior with first/lastaction (from debug): logrotate: read line firstaction logrotate: Setting firstaction to True logrotate: read line net stop syslog-ng logrotate: read line endscript logrotate: read line } Service not stopping (nor starting). BTW (more a feature request) would love if somehow that was a blocking command, i.e. "Don't proceed to next rotation until action retursn positive...
Ken: With 0.18 I'm getting the same as with with both pre and post with "net start/stop service_name", ditto same behavior with first/lastaction (from debug): logrotate: read line firstaction logrotate: Setting firstaction to True logrotate: read line net stop syslog-ng logrotate: read line endscript logrotate: read line }
-- Double Post -- (not seeing a way to delete)
FYI found the issue thanks to another guy, the olddir directive does not take quotations (for parths) of any sort, single or double, contrary to the docs just FYI.
FYI found the issue thanks to another guy, the olddir directive does not take quotations (for parths) of any sort, single or double, contrary to the docs just FYI.
So a lot of people are posting about various hard exists based on a vareity issues from "not C:" (fixed I think) to "numbers in path" etc. I'm getting this myself though not numbers, etc. logrotate: Exception: Illegal characters in path. logrotate: StackTrace: at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boo lean expandShortPaths) at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetFullPathInternal(String...
Not the best at Windows etc.. more an AIX guy. BUT.. I downloaded the package. Tested it on a windows server. Appears to install correctly. But when I try to run logrotate I get a pop up that Windows features couldnt install .NET Framework 3.5. All I can find googling is the logrotate app might be dependent on .NET being installed? Thanks for any help!
Hi, we've got a project here which produces so much logs, that we'd like to rotate hourly (Unix version of logrotate supports this). Is this possible to implement in LogRotateWin? The master branch on on github seems to be 0.0.0.12 instead of 0.0.0.18 - which is the correct version? regards, Christian
Hello everyone! I cant send e-mail notify with LogRotateWin. Logs is sucessfully rotated but there is no e-mail. Where I made a mistake? logrotate.conf: smtpserver smtp.companydomain.com smtpport 465 smtpssl smtpuser alert@companydomain.com smtpuserpwd Pa$$W0rD mail info@companydomain.com "C:\Program Files\rclone\logs\rclone.log" { daily nocompress rotate 7 postrotate endscript } Log: C:\Program Files (x86)\Ken Salter\LogRotate>logrotate Content\logrotate.conf -v logrotate: logrotate 0.0.0.18 - Copyright...
Hello everyone! I cant send e-mail notify with LogRotateWin. Logs is sucessfully rotated but there is no e-mail. Where I made a mistake? logrotate.conf: smtpserver smtp.companydomain.com smtpport 465 smtpssl smtpuser alert@companydomain.com smtpuserpwd Pa$$W0rD mail info@companydomain.com "C:\Program Files\rclone\logs\rclone.log" { daily nocompress rotate 7 postrotate endscript } Log: C:\Program Files (x86)\Ken Salter\LogRotate>logrotate Content\logrotate.conf -v logrotate: logrotate 0.0.0.18 - Copyright...
Hello everyone! I cant send e-mail notify with LogRotateWin. Logs is sucessfully rotated but there is no e-mail. Where I made a mistake? logrotate.conf: smtpserver smtp.companydomain.ru smtpport 465 smtpuser alert@companydomain.com smtpuserpwd Pa$$W0rD mail info@companydomain.com "C:\Program Files\rclone\logs\rclone.log" { daily nocompress rotate 7 postrotate endscript } Log: C:\Program Files (x86)\Ken Salter\LogRotate>logrotate Content\logrotate.conf -v logrotate: logrotate 0.0.0.18 - Copyright...
Firstly, thanks for the port of logrotate, makes my life much easier. I've come across something that breaks logrotatewin. In my situation, I have apache tomcat 8.5, the path is C:\apache\8.5\logs. I have tried wrapping it with quotes or no quotes. When parsing the conf file, here is what I get with -v -d flags. C:\Program Files (x86)\LogRotate>logrotate -d Content/logrotate.conf logrotate: Debug option set to true logrotate: Verbose option set to true logrotate: Content/logrotate.conf Adding to...
Firstly, thanks for the port of logrotate, makes my life much easier. I've come across something that breaks logrotatewin. In my situation, I have apache tomcat 8.5, the path is C:\apache\8.5\logs. I have tried wrapping it with quotes or no quotes. When parsing the conf file, here is what I get with -v -d flags. C:\Program Files (x86)\LogRotate>logrotate -d Content/logrotate.conf logrotate: Debug option set to true logrotate: Verbose option set to true logrotate: Content/logrotate.conf Adding to...
Firstly, thanks for the port of logrotate, makes my life much easier. I've come across something that breaks logrotatewin. In my situation, I have apache tomcat 8.5, the path is C:\apache\8.5\logs. I have tried wrapping it with quotes or no quotes. When parsing the conf file, here is what I get with -v -d flags. C:\Program Files (x86)\LogRotate>logrotate -d Content/logrotate.conf logrotate: Debug option set to true logrotate: Verbose option set to true logrotate: Content/logrotate.conf Adding to...
Firstly, thanks for the port of logrotate, makes my life much easier. I've come across something that breaks logrotate win. In my situation, I have apache tomcat 8.5, the path is C:\apache\8.5\logs. I have tried wrapping it with quotes or no quotes. When parsing the conf file, here is what I get with -v -d flags. C:\Program Files (x86)\LogRotate>logrotate -d Content/logrotate.conf logrotate: Debug option set to true logrotate: Verbose option set to true logrotate: Content/logrotate.conf Adding to...
If you place some spaces between a key and its numeric value the config file cannot be parsed anymore... parameters should be trimmed before parsing.
Hi! I've added "extension log" in my config, but when logrotate runs, it still rotates my file test.log as test.1 instead of test.1.log, as is written in the wiki Thanks.
Glad to hear it...I will package this up and make it official shortly.
Worked like a charm! Thanks!
Can you try with this version attached to this post?
Let me take a look....
Okay I have compiled a version to test with...let me know how this works for you
Thanks, so I see that it sees the postrotate section...I'll get back to you hopefully...
C:\Program Files (x86\LogRotate>logrotate.exe -d -f -v d:\Logs\log_rotate.conf.txt...
Can you run again with the "-d" command line option added?
I'll take a look...
My Config: D:\Logs\SERVER-07.log { rotate 5 daily prerotate net stop MySQL57 endscript...
cfg: nocompress C:\Tools\TalendOpenStudio\logs\*.* { olddir C:\Tools\TalendOpenStudio\logs\backup...
C:\ErrorLog\TraceLog.log { daily compress copytruncate prerotate @echo off echo This...
Hello everyone: I've been trying to install logrotate to rotate logs of squid on...
Hello everyone. I ran afoul of this same error, which cleared up once I downloaded...
I have tested the manual execution of the logrotatewin utility and have made the...
Hello, Is there any news regarding this issue?
You were right about the code, and it did work, I just needed to think of the the...
You were right about the code, and it did work, I just needed to think of the the...
I think (I haven't looked at the code) that it needs to see a \ in the path. So perhaps...
Hi, is it possible not to specify a directory for the file location and use the current...
Hi everyone, I'm interested in rotating a log file with a date extension so that...
Excellent news. I will post this an official release shortly.
Ken, that works perfectly! I also did a couple of other tests with different filenames...
Okay Dom, I have attached 0.0.0.16 to this post. Give it a try.
Nevermind, I was able to duplicate it...will post a fix shortly
Interesting, I was unable to duplicate the odd numbering. It seems to be working...
Okay thanks for the info...will take a look.
Hi Ken, I hadn't tried that (just v0.0.0.14 from the download). Just did a quick...
Dom, have you tried the test version attached to the post above yours?
Just curious if there was any update on this (the number in the filename, not the...
Same here. Did you solve your problem? Ken - in my case I tried any command I could,...
Okay, here is a new test version where I have added 3 new conf entries to help with...
Okay from this I see that I was able to handle not being able to parse the DMSServer1.out00001...
Ken, I would expect the copytruncate flag fix (as discussed https://sourceforge.net/p/logrotatewin/discussion/general/thread/2fa14b0a/#275e)...