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 { ...@@ -41,10 +41,18 @@ sub new {
configuration => $args{configuration}, configuration => $args{configuration},
}; };
$self->{logger} = IdPAccountManager::Logger->new( eval {
file => $self->{configuration}->{log_file}, $self->{logger} = IdPAccountManager::Logger->new(
verbosity => $self->{configuration}->{log_level} 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( $self->{logger}->log(
level => LOG_INFO, level => LOG_INFO,
message => '' message => ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment