Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev
log filtering
 

Index | Next | Previous | View Flat


goe at space

Sep 4, 2008, 2:49 AM


Views: 645
Permalink
log filtering

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
Attachments: debug_parameters.patch (1.52 KB)
  smime.p7s (4.68 KB)

Subject User Time
log filtering goe at space Sep 4, 2008, 2:49 AM
    Re: log filtering bruce at drangle Sep 4, 2008, 11:26 AM
        Re: log filtering Wade.Stuart at fallon Sep 4, 2008, 4:26 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.