From: Stefan Schantl Date: Wed, 9 Dec 2015 12:29:20 +0000 (+0100) Subject: Rename "New" method to "Init" for creating or updating the Logger. X-Git-Tag: 2.0~56 X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fguardian.git;a=commitdiff_plain;h=aab61123f038b5f411a0f6cd05202a335e9d1221 Rename "New" method to "Init" for creating or updating the Logger. Signed-off-by: Stefan Schantl --- 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;