From aab61123f038b5f411a0f6cd05202a335e9d1221 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 9 Dec 2015 13:29:20 +0100 Subject: [PATCH] Rename "New" method to "Init" for creating or updating the Logger. Signed-off-by: Stefan Schantl --- guardian | 4 ++-- modules/Logger.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/guardian b/guardian index 9245f90..22856c9 100644 --- a/guardian +++ b/guardian @@ -70,7 +70,7 @@ if (defined($cmdargs{"help"})) { my %mainsettings = &Guardian::Config::UseConfig($cmdargs{"config"}); # Initialize Logger. -my $logger = Guardian::Logger->New(%mainsettings); +my $logger = Guardian::Logger->Init(%mainsettings); $logger->Log("debug", "Logger successfully initialized..."); # Add the logger object to the mainsettings for passing @@ -344,7 +344,7 @@ sub Reload () { %mainsettings = &Guardian::Config::UseConfig($cmdargs{"config"}); # Update Logger settings. - $logger = Guardian::Logger->Update(%mainsettings); + $logger = Guardian::Logger->Init(%mainsettings); # Update logger object in mainsettings hash. $mainsettings{Logger} = $logger; diff --git a/modules/Logger.pm b/modules/Logger.pm index 6a70bc3..270a059 100644 --- a/modules/Logger.pm +++ b/modules/Logger.pm @@ -24,7 +24,7 @@ my %logfacilities = ( # -## The "New" (Logger) function. +## The "Init" (Logger) function. # ## This function is responsible to initialize the Logger as a class based object. ## It has to be called once before logging can be done. @@ -32,7 +32,7 @@ my %logfacilities = ( ## The following arguments must be passed, when initializing a new Logger: ## "LogLevel" and "LogFacility" with valid values from above. # -sub New (%) { +sub Init (%) { my ( $class, %args ) = @_; my $self = \%args; -- 2.39.2