Hi,
I need to filter the log output of an intranet app, because it
authenticates users against our LDAP server and it is not desired to
have the LDAP passwords of my colleagues in the logs - even if debugging
is on for only a few minutes to track down a problem.
I found this topic was on the list a few years ago:
http://lists.scsys.co.uk/pipermail/catalyst-dev/2006-January/000077.html
The proposed solution was to suppress output with $c->log->abort(1).
Unfortunately this also supresses the username, which makes searching
logs quite painful.
So i started to hack a solution for this problem. First I overode
prepare_body() in MyApp.pm which works fine as long as nobody touches it
in Catalyst.pm. Then I tried to write a plugin, but it's same problem -
I have to touch the plugin everytime the logic of prepare_body() changes.
Finally I encapsulated part of the code which writes the debug
information to the function debug_parameters().
In Catalyst.pm it does what it did before, in MyApp.pm it prints out
whatever I like - especially no passwords.
I attached a patch against Catalyst.pm Version 5.7014.
What do you think of this?
Georg
I need to filter the log output of an intranet app, because it
authenticates users against our LDAP server and it is not desired to
have the LDAP passwords of my colleagues in the logs - even if debugging
is on for only a few minutes to track down a problem.
I found this topic was on the list a few years ago:
http://lists.scsys.co.uk/pipermail/catalyst-dev/2006-January/000077.html
The proposed solution was to suppress output with $c->log->abort(1).
Unfortunately this also supresses the username, which makes searching
logs quite painful.
So i started to hack a solution for this problem. First I overode
prepare_body() in MyApp.pm which works fine as long as nobody touches it
in Catalyst.pm. Then I tried to write a plugin, but it's same problem -
I have to touch the plugin everytime the logic of prepare_body() changes.
Finally I encapsulated part of the code which writes the debug
information to the function debug_parameters().
In Catalyst.pm it does what it did before, in MyApp.pm it prints out
whatever I like - especially no passwords.
I attached a patch against Catalyst.pm Version 5.7014.
What do you think of this?
Georg