Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createolddir #50

Open
jajator opened this issue Mar 31, 2022 · 2 comments
Open

createolddir #50

jajator opened this issue Mar 31, 2022 · 2 comments
Assignees
Labels

Comments

@jajator
Copy link

jajator commented Mar 31, 2022

whenever olddir is specified and not existing, i get this error:

Process-Local-Block : Skipping over processing log C:\logs\log.log. At C:\Program Files\WindowsPowerShell\Modules\Log-Rotate\public\Log-Rotate.ps1:207 char:13 Process-Local-Block -block $block @blockoptions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Process-Local-Block

createolddir does nothing, adding firstaction..mkdir..endscript doesnt work because firstaction seems to be executed after that error message.
Can someone please shed some light on whats happening here and how I can create olddir if its not existing?

@leojonathanoh leojonathanoh self-assigned this Jul 7, 2022
@leojonathanoh
Copy link
Member

@jajator createolddir is not supported. Is it a new option in logrotate?

@leojonathanoh
Copy link
Member

I believe the behavior of olddir is to not run if the directory is absent in the original logrotate utility.

So you'll have to create the directory before running. Note that you may also use an absolute path for olddir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants