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

Log::Dispatch::File doesn't re-chmod after re-open in close_after_write mode #56

Open
shadowcat-mst opened this issue Apr 17, 2019 · 1 comment
Labels

Comments

@shadowcat-mst
Copy link

File created correctly first time. After file goes away due to rotation, file recreated but $self->{chmodded} is still set so it doesn't check the permissions this time and the file doesn't get chmod()ed. Pretty sure all you need is to add 'delete $_[0]->{chmodded}' in the last 'if' of log_message, and in the mean time the following nasty hack appears to be holding up:

{ package Log::Dispatch::File; use Class::Method::Modifiers;
  after log_message => sub { delete $_[0]->{chmodded} if $_[0]->{close} } }
@autarch
Copy link
Member

autarch commented Jul 28, 2019

Doh, sorry for the slow response. A PR would be welcome.

@autarch autarch added the stalled label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants