Tags:
create new tag
view all tags

StoreDotPm writeLog

Typical writeLog entry

From RegisterDotPm:

 if (TWiki::doLogRegistration) {
   TWiki::Store::writeLog( "register", "$data{webName}.$data{WikiName}",
                           $data{Email}, $data{WikiName} );
 }

Discussion

I believe that it would be better to have a Logger class, with subs such as:

TWiki::Logger::Activity::logRegister($webWikiName, $email, $wikiName);

This would unconditionally get called. Internally the first thing it would do is check against $TWiki::Logger::Activity::activeLogs{registration}, with that hash being set up on initialisation.

Comments?

-- MartinCleaver - 07 Nov 2004

Certainly possible. However, it looks overkill to me for this simple functionality. An if test is faster then a new class and method call.

-- PeterThoeny - 09 Nov 2004

Ok, assuming that I want to continue building the RegisterCgiScriptRewrite for the moment, where do I request the allocation of new verbs for the first parameter? Like, should I just make it up? resetpassword? passwordreset? passwdreset? PasswordReset? passwordReset? I just think that having them locked down as methods on a class would better ensure the integrity of the log file. More coordination mechanism classes are necessary if more people are to work on the core.

-- MartinCleaver - 09 Nov 2004

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2004-11-09 - MartinCleaver
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.