Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
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
%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;
-## 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.
## 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.
#
my ( $class, %args ) = @_;
my $self = \%args;
my ( $class, %args ) = @_;
my $self = \%args;