diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 68c2e8eae..d45914cfc 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -13,8 +13,8 @@ save you many hours of grief. to be installed on your system manually. You can optionally just use the WebGUI runtime environment to save yourself the hassle of downloading all of them. You can also install - them using testEnvironment.pl --install-modules - The new modules you'll need to install are: + them using testEnvironment.pl The new modules you'll need + to install are: Net::LDAP Date::Manip @@ -23,14 +23,17 @@ save you many hours of grief. HTML::TagFilter HTML::Template Parse::PlainConfig - HTTP::BrowserDetect - Parse::RecDescent - Text::Balanced Tie::IxHash Tie::CPHash XML::RSSLite XML::Simple + * After upgrading you'll need to create a log.conf file in your etc + folder for the new logger. For most situations you can just copy + log.conf.original to log.conf and you'll be fine. If you want + to set up custom logging rules, see this web page: + http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/Config.html + 6.5.0 -------------------------------------------------------------------- diff --git a/docs/migration.txt b/docs/migration.txt index 8e1efc113..dd19db0b4 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -349,3 +349,10 @@ In 6.3 the template system has been replaced in favor of the new template asset. Please see WebGUI::Asset::Template for details. +5.17 WebGUI::ErrorHandler API Changed + +In 6.6 we brought log4perl to bear on our debuging and logging needs. This had +a slight impact on the WebGUI::ErrorHandler API. Although there are many +changes, the only thing anyone should notice is that fatalError() was renamed +to fatal(). + diff --git a/docs/upgrades/upgrade_6.5.5-6.6.0.pl b/docs/upgrades/upgrade_6.5.5-6.6.0.pl index 67aa91879..fb978b898 100644 --- a/docs/upgrades/upgrade_6.5.5-6.6.0.pl +++ b/docs/upgrades/upgrade_6.5.5-6.6.0.pl @@ -23,6 +23,20 @@ print "\tDeleting old templates\n" unless ($quiet); my $asset = WebGUI::Asset->newByDynamicClass("PBtmpl0000000000000035"); $asset->purge; +#-------------------------------------------- +print "\tUpdating config file.\n" unless ($quiet); +my $pathToConfig = '../../etc/'.$configFile; +my $conf = Parse::PlainConfig->new('DELIM' => '=', 'FILE' => $pathToConfig, 'PURGE'=>1); +my %newConfig; +foreach my $key ($conf->directives) { + unless ($key eq "logfile" || $key eq "passwordChangeLoggingEnabled" || $key eq "emailRecoveryLoggingEnabled") { + $newConfig{$key} = $conf->get($key); + } +} +$conf->purge; +$conf->set(%newConfig); +$conf->write; + WebGUI::Session::close(); diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index 226ce3a5b..b144fa77a 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -28,8 +28,6 @@ dsn = DBI:mysql:www_example_com dbuser = webgui dbpass = password -logfile = /var/log/webgui.log - extrasURL = /extras extrasPath = /data/WebGUI/www/extras @@ -44,9 +42,6 @@ templateCacheType=file passiveProfileInterval = 86400 # in seconds -emailRecoveryLoggingEnabled = 1 -passwordChangeLoggingEnabled = 1 - paymentPlugins = ITransact authMethods = LDAP, WebGUI diff --git a/etc/log.conf.original b/etc/log.conf.original index b515bce8d..183d0f115 100644 --- a/etc/log.conf.original +++ b/etc/log.conf.original @@ -1,6 +1,6 @@ log4perl.logger = DEBUG, mainlog log4perl.appender.mainlog = Log::Log4perl::Appender::File -log4perl.appender.mainlog.filename = /var/log/webguitest.log +log4perl.appender.mainlog.filename = /var/log/webgui.log log4perl.appender.mainlog.layout = PatternLayout log4perl.appender.mainlog.layout.ConversionPattern = %d - %p - %c - %M[%L] - %m%n diff --git a/lib/WebGUI/Auth/WebGUI.pm b/lib/WebGUI/Auth/WebGUI.pm index df843bc43..e3662cd25 100644 --- a/lib/WebGUI/Auth/WebGUI.pm +++ b/lib/WebGUI/Auth/WebGUI.pm @@ -67,9 +67,7 @@ sub _isValidPassword { =cut sub _logSecurityMessage { - if($session{config}{passwordChangeLoggingEnabled}) { - WebGUI::ErrorHandler::security("change password. Password changed successfully"); - } + WebGUI::ErrorHandler::security("change password. Password changed successfully"); } #------------------------------------------------------------------- @@ -535,9 +533,7 @@ sub recoverPasswordFinish { $encryptedPassword = Digest::MD5::md5_base64($password); $self->saveParams($userId,"WebGUI",{identifier=>$encryptedPassword}); _logSecurityMessage(); - if($session{config}{emailRecoveryLoggingEnabled}) { - WebGUI::ErrorHandler::security("recover a password. Password emailed to: ".$session{form}{email}); - } + WebGUI::ErrorHandler::security("recover a password. Password emailed to: ".$session{form}{email}); $message = $session{setting}{webguiRecoverPasswordEmail}; $message .= "\n".WebGUI::International::get(50).": ".$username."\n"; $message .= WebGUI::International::get(51).": ".$password."\n";