Skip to content
Snippets Groups Projects
Commit b672b10f authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

make log opening error non-fatal

parent 52538fbb
No related branches found
No related tags found
No related merge requests found
......@@ -41,10 +41,18 @@ sub new {
configuration => $args{configuration},
};
$self->{logger} = IdPAccountManager::Logger->new(
file => $self->{configuration}->{log_file},
verbosity => $self->{configuration}->{log_level}
);
eval {
$self->{logger} = IdPAccountManager::Logger->new(
file => $self->{configuration}->{log_file},
verbosity => $self->{configuration}->{log_level}
);
};
if ($EVAL_ERROR) {
$self->{logger} = IdPAccountManager::Logger->new(
file => '/dev/null',
verbosity => $self->{configuration}->{log_level}
);
}
$self->{logger}->log(
level => LOG_INFO,
message => ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment