Better log messages (#2165)

This commit is contained in:
Clément OUDOT 2020-05-04 21:48:06 +02:00
parent 6caf88a174
commit 7ed251ce3f

View File

@ -6,7 +6,7 @@ use Lemonldap::NG::Common::Combination::Parser;
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_ERROR PE_FIRSTACCESS); use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_ERROR PE_FIRSTACCESS);
use Scalar::Util 'weaken'; use Scalar::Util 'weaken';
our $VERSION = '2.0.7'; our $VERSION = '2.0.8';
# TODO: See Lib::Wrapper # TODO: See Lib::Wrapper
extends 'Lemonldap::NG::Portal::Main::Auth'; extends 'Lemonldap::NG::Portal::Main::Auth';
@ -142,8 +142,9 @@ sub authLogout {
->[0]; ->[0];
unless ($sub) { unless ($sub) {
$self->logger->warn( $self->logger->warn(
"Condition changed between and logout, unable to select good backend" "Condition changed between login and logout for "
); . $req->user
. ", unable to select good backend" );
return PE_ERROR; return PE_ERROR;
} }
my ( $res, $name ) = $sub->( 'authLogout', @_ ); my ( $res, $name ) = $sub->( 'authLogout', @_ );
@ -218,8 +219,9 @@ sub try {
# If more than 1 scheme is available # If more than 1 scheme is available
my ( $res, $name ); my ( $res, $name );
unless ( ref $stack->[$nb]->[$type] ) { unless ( ref $stack->[$nb]->[$type] ) {
$self->logger->error( $self->logger->error( 'Something went wrong in combination for '
'Something went wrong in combination, unable to find any auth scheme (try == ' . $req->user
. ', unable to find any auth scheme (try == '
. ( $nb + 1 ) . ( $nb + 1 )
. ')' ); . ')' );
return PE_ERROR; return PE_ERROR;