]> git.ipfire.org Git - people/stevee/guardian.git/commitdiff
Rename "New" method to "Init" for creating or updating the Logger.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 9 Dec 2015 12:29:20 +0000 (13:29 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 9 Dec 2015 12:29:20 +0000 (13:29 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
guardian
modules/Logger.pm

index 9245f9004827548fda1f18cecb747c1c11e85bdd..22856c9395b087be9caffb8072775ce920bed307 100644 (file)
--- a/guardian
+++ b/guardian
@@ -70,7 +70,7 @@ if (defined($cmdargs{"help"})) {
 my %mainsettings = &Guardian::Config::UseConfig($cmdargs{"config"});
 
 # Initialize Logger.
 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
 $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.
        %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;
 
        # Update logger object in mainsettings hash.
        $mainsettings{Logger} = $logger;
index 6a70bc37fba82acdce837dc82bd9cc3ae31297b4..270a059944be058c9fc29aeb4375d34dc3829df3 100644 (file)
@@ -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.
 #
 ## 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.
 #
 ## 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;
 
        my ( $class, %args ) = @_;
        my $self = \%args;