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