Skip to content

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

@shadowcat-mst

Description

@shadowcat-mst

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} } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions