Skip to content

Commit

Permalink
log ldap requests as info
Browse files Browse the repository at this point in the history
  • Loading branch information
djschilling committed Jan 16, 2023
1 parent 1c62f1d commit c9d4d31
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ctldap.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,8 @@ function authorize(req, res, next) {
* @param {function} next - Next handler function of filter chain
*/
function searchLogging (req, res, next) {
logDebug(req.site, "SEARCH base object: " + req.dn.toString() + " scope: " + req.scope);
logDebug(req.site, "Filter: " + req.filter.toString());
logInfo(req.site, "SEARCH base object: " + req.dn.toString() + " scope: " + req.scope);
logInfo(req.site, "Filter: " + req.filter.toString());
return next();
}

Expand Down Expand Up @@ -587,7 +587,6 @@ Object.keys(config.sites).map(function(sitename, index) {
req.site = config.sites[sitename];
next();
}, searchLogging, authorize, function (req, res, next) {
logInfo({ sitename: sitename }, "Search for users");
req.checkAll = req.scope !== "base";
return next();
}, requestUsers, sendUsers, endSuccess);
Expand All @@ -597,7 +596,6 @@ Object.keys(config.sites).map(function(sitename, index) {
req.site = config.sites[sitename];
next();
}, searchLogging, authorize, function (req, res, next) {
logInfo({ sitename: sitename }, "Search for groups");
req.checkAll = req.scope !== "base";
return next();
}, requestGroups, sendGroups, endSuccess);
Expand Down

0 comments on commit c9d4d31

Please sign in to comment.