From f7cc7b2b6613e9b5d68e09bc7c17aa22cdc47514 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Sat, 14 Jan 2017 08:17:42 +0000 Subject: [PATCH] More debug (#595) --- lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm | 1 + lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm | 2 ++ lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm | 2 +- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm index 45c4398c0..a92531ad9 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm @@ -22,6 +22,7 @@ sub addRoute { my ( $self, $word, $dest, $methods, $transform ) = (@_); $methods ||= [qw(GET POST PUT DELETE)]; foreach my $method (@$methods) { + $self->lmLog( "Add $method route:", 'debug' ); $self->genRoute( $self->routes->{$method}, $word, $dest, $transform ); } return $self; diff --git a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm index de2229f6c..76fb39a8c 100644 --- a/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm +++ b/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/PSGI/Try.pm @@ -24,12 +24,14 @@ sub addRoute { sub addAuthRoute { my $self = shift; $self->routes( $self->authRoutes ); + $self->lmLog( 'Declaring auth route', 'debug' ); return $self->SUPER::addRoute(@_); } sub addUnauthRoute { my $self = shift; $self->routes( $self->unAuthRoutes ); + $self->lmLog( 'Declaring unauth route', 'debug' ); return $self->SUPER::addRoute(@_); } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm index 792f94251..3a8e0a01a 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/Demo.pm @@ -24,7 +24,7 @@ sub init { # Add warning in log $self->lmLog( - "Using demonstration mode, go in Manager to edit the configuration", + "Using demonstration mode, go to Manager to edit the configuration", 'warn' ); 1; diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm index cc9cd4ca3..e1110cb29 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Init.pm @@ -276,6 +276,7 @@ sub loadPlugin { } } ( $obj and $obj->init ) or return 0; + $self->lmLog( "Plugin $plugin initializated", 'debug' ); return $obj; }