I've tried your tool and it seems to be the one I need. But unfortunately I have some problems when I try to rotate files where the path contains spaces (e.g. C:\Temp\New folder\test.log).
Then I receive the error:
C:\Program Files (x86)\Logrotate>logrotate.exe logrotate.conf -f
logrotate: Force option set to true
logrotate: Exception: Illegal characters in path.
logrotate: StackTrace: at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo..ctor(String fileName)
at logrotate.Program.Main(String[] args)
logrotate: Exception: Illegal characters in path.
logrotate: StackTrace: at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo..ctor(String fileName)
at logrotate.Program.Main(String[] args)
C:\Program Files (x86)\Logrotate>
Below you will see my config file (it is just a simple one):
compress
"C:\Temp\New folder\test.log" {
rotate 5
create
}
I use Windows 2008 R2 Server. What's going wrong?
Thanks in advance.
proxymus-o
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
C:\Program Files (x86)\Logrotate>logrotate.exe -d -v logrotate1.conf
logrotate: Debug option set to true
logrotate: Verbose option set to true
logrotate: logrotate1.conf Adding to config files to process
logrotate: Parsing configuraiton file logrotate1.conf
logrotate: read line compress
logrotate: Setting compress to True logrotate: read line "C:\AutoTracker\AT Server\ATServerLog*" {
logrotate: Processing new section
logrotate: read line rotate 5
logrotate: Setting rotate to 5
logrotate: read line daily
logrotate: Setting daily to True
logrotate: read line } logrotate: Processing "C:\AutoTracker\AT logrotate: "C:\AutoTracker\AT could not be found logrotate: Processing Server\ATServerLog*" logrotate: Server\ATServerLog\" could not be found
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've tried your tool and it seems to be the one I need. But unfortunately I have some problems when I try to rotate files where the path contains spaces (e.g. C:\Temp\New folder\test.log).
Then I receive the error:
C:\Program Files (x86)\Logrotate>logrotate.exe logrotate.conf -f
logrotate: Force option set to true
logrotate: Exception: Illegal characters in path.
logrotate: StackTrace: at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo..ctor(String fileName)
at logrotate.Program.Main(String[] args)
logrotate: Exception: Illegal characters in path.
logrotate: StackTrace: at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo..ctor(String fileName)
at logrotate.Program.Main(String[] args)
C:\Program Files (x86)\Logrotate>
Below you will see my config file (it is just a simple one):
compress
"C:\Temp\New folder\test.log" {
rotate 5
create
}
I use Windows 2008 R2 Server. What's going wrong?
Thanks in advance.
proxymus-o
Hi proxymus-o
A couple of things to try:
1) put the -f as the first argument in your command line i.e. logrotate -f logrotate.conf
2) put a fully qualified path to your conf file in the command line i.e. logrotate -f "C:\Program Files (x86)\Logrotate\logrotate.conf"
Last edit: Ken Salter 2013-05-16
Hi Ken,
I've tried both things, but none of them works. I've pasted the output to pastebin.com
http://pastebin.com/fsRR1P4H
Thanks in advance and kind regards
proxymus-o
Hi.
Same issue for me.
And anoother error "logrotate: Unknown directive notifempty"
Using logrotate 0.0.0.6
Making some test I found the problem is the "" characters in .conf
Error with:
"C:\Program Files (x86)\LightTPD\logs\*.log" {
...
It works with:
C:\PROGRA~2\LightTPD\logs\*.log {
...
Thanks.
Last edit: kralizeck 2013-06-10
Hi.
Same problem. Debug log:
C:\Program Files (x86)\Logrotate>logrotate.exe -d -v logrotate1.conf
logrotate: Debug option set to true
logrotate: Verbose option set to true
logrotate: logrotate1.conf Adding to config files to process
logrotate: Parsing configuraiton file logrotate1.conf
logrotate: read line compress
logrotate: Setting compress to True
logrotate: read line "C:\AutoTracker\AT Server\ATServerLog*" {
logrotate: Processing new section
logrotate: read line rotate 5
logrotate: Setting rotate to 5
logrotate: read line daily
logrotate: Setting daily to True
logrotate: read line }
logrotate: Processing "C:\AutoTracker\AT
logrotate: "C:\AutoTracker\AT could not be found
logrotate: Processing Server\ATServerLog*"
logrotate: Server\ATServerLog\" could not be found
Hi! Can you post your logrotate1.conf?
I have uploaded version 0.0.0.9 which should fix this issue.
Problem solved. Thanks!